def checkGit(self): if not util.isCommandExists('git'): print 'GIT is non-existent' return False if not os.path.isdir('.git'): self.forceInitGitRepo() os.system('git add . && git commit -am "update at %s"' % util.toUTCISO8601()) return True
def addUrl(self, loc, lastmod = None, changefreq = 'monthly', priority = '0.5'): if not loc: return lastmod = util.toUTCISO8601( lastmod ) url = util.parseTemplateString(self.SM_UPL_TPL, (loc, lastmod)) self.urls.append(url)