Example #1
0
 def create_sync_lock_file(self):
     """
     creates the sync lock file
     """
     
     if self.__is_sync_active():
         # sync is already active
         return False
     
     # get sync lock file
     path = self.__get_lockfile_path()
     
     # get current pid
     pid = PidHelper.get_current_pid()
     
     # write new pid file
     pid_file = open(path, "w")
     pid_file.write(str(pid))
     pid_file.close()
     
     # done
     return True