예제 #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)')
예제 #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)')
예제 #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.")
예제 #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.")
예제 #6
0
 def parseOptions(self):
     ZCmdBase.parseOptions(self)
     if len(self.args) > 0:
         self.filename = self.args[0]
예제 #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
예제 #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.")
예제 #9
0
 def parseOptions(self):
     ZCmdBase.parseOptions(self)
     if len(self.args) > 0:
         self.filename = self.args[0]
예제 #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