Esempio n. 1
0
 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)')
Esempio n. 3
0
    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)')
Esempio n. 4
0
 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.")
Esempio n. 5
0
 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.")
Esempio n. 6
0
 def parseOptions(self):
     ZCmdBase.parseOptions(self)
     if len(self.args) > 0:
         self.filename = self.args[0]
Esempio n. 7
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
Esempio n. 8
0
 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.")
 def parseOptions(self):
     ZCmdBase.parseOptions(self)
     if len(self.args) > 0:
         self.filename = self.args[0]
Esempio n. 10
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