Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.needToUpdate = True
if rec:
# that file is now done
rec['uri'] = result
rec['state'] = 'idle'
elif name not in ['__manifest', self.index, self.sitemap]:
self.log(ERROR,
"insert:%s: Don't have a record for file %s" % (
self.name, name))
# now, make sure that all currently inserting files have a job on the queue
for rec in self.files:
if rec['state'] != 'inserting':
continue
if not queuedJobs.has_key(rec['name']):
self.log(CRITICAL, "insert: node has forgotten job %s" % rec['name'])
rec['state'] = 'waiting'
self.needToUpdate = True
# check for any uninserted files or manifests
stillInserting = False
for rec in self.files:
if rec['state'] != 'idle':
stillInserting = True
if needToInsertManifest:
stillInserting = True
# is insert finally complete?
if not stillInserting:
# yes, finally done
self.updateInProgress = False
# determine pathname for sites ini file
if configFile == None:
isDoze = sys.platform.lower().startswith("win")
homedir = os.path.expanduser("~")
if isDoze:
filename = "freesites.ini"
else:
filename = ".freesites"
configFile = os.path.join(homedir, filename)
self.configFile = configFile
if not os.path.isfile(configFile):
self.createConfig()
self._log(CRITICAL, "New config file created at %s" % configFile)
self._log(CRITICAL, "Please edit that file and add your freesites")
self.loadConfig()
# determine pathname for sites ini file
if configFile == None:
isDoze = sys.platform.lower().startswith("win")
homedir = os.path.expanduser("~")
if isDoze:
filename = "freesites.ini"
else:
filename = ".freesites"
configFile = os.path.join(homedir, filename)
self.configFile = configFile
if not os.path.isfile(configFile):
self.createConfig()
self._log(CRITICAL, "New config file created at %s" % configFile)
self._log(CRITICAL, "Please edit that file and add your freesites")
self.loadConfig()