def buildOptions(self): """ Command-line options for LocationDump """ ZCmdBase.buildOptions(self) self.parser.add_option('-o', '--outfile', dest='outfile', default="locdump.out", help='output file')
def buildOptions(self): ZCmdBase.buildOptions(self) self.parser.add_option('-x', '--commitCount', dest='commitCount', default=1000, type="int", help='how many lines should be loaded before commit') self.parser.add_option('-n', '--noCommit', dest='noCommit', action="store_true", default=0, help='Do not store changes to the Dmd (for debugging)')
def buildOptions(self): ZCmdBase.buildOptions(self) self.parser.add_option( '-x', '--commitCount', dest='commitCount', default=1000, type="int", help='how many lines should be loaded before commit') self.parser.add_option( '-n', '--noCommit', dest='noCommit', action="store_true", default=0, help='Do not store changes to the Dmd (for debugging)')
def backupZenPackDelegate(self): """ Call backup method on all installed zenpacks @return: """ dmd = ZCmdBase(noopts=True).dmd self.log.info("Backing up ZenPack contents.") for pack in dmd.ZenPackManager.packs(): pack.backup(self.tempDir, self.log) self.log.info("Backup of ZenPack contents complete.")
def restoreZenPackContents(self): dmd = ZCmdBase(noopts=True).dmd self.log.info("Restoring ZenPack contents.") for pack in dmd.ZenPackManager.packs(): pack.restore(self.tempDir, self.log) self.log.info("ZenPack contents restored.")
def parseOptions(self): ZCmdBase.parseOptions(self) if len(self.args) > 0: self.filename = self.args[0]
def __init__(self, noopts=0, app=None, ignoreComments=True): '''Handle command line options, get app instance,and setup log file''' ZCmdBase.__init__(self, noopts, app) self.lineNumber = 0 self.ignoreComments = ignoreComments
def backupZenPackContents(self): dmd = ZCmdBase(noopts=True).dmd self.log.info("Backing up ZenPack contents.") for pack in dmd.ZenPackManager.packs(): pack.backup(self.tempDir, self.log) self.log.info("Backup of ZenPack contents complete.")