IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 19, 2013, 8:27:58 AM (13 years ago)
Author:
eugene
Message:

fix setupScratchDb.py to work with new config layout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/setupScratchDb.py

    r35097 r35178  
    5757        self.config = Config()
    5858
    59         if len(argv) < 2:
     59        if len(argv) != 1:
    6060            self.printUsage()
    6161            self.exitProgram("incorrect args")
     
    6565        self.PID = os.getpid()
    6666
     67        self.config.setScratchDbLeaf(self.HOST)
     68
    6769        # XXX Shouldn't config set up logger?
    6870        # (not yet, since we set HOST & PID with program...)
     
    7072
    7173        try:
    72             self.scratchDb = ScratchDb(self.logger, self.config, argv[1])
     74            self.scratchDb = ScratchDb(self.logger, self.config)
    7375        except:
    7476            self.exitProgram("Could not connect to a scratch Db")
     
    100102    def printUsage(self):
    101103        # write message to log or stdout if no logger set up
    102         msg = os.path.basename(sys.argv[0]) + " <scratchdb_version> "
     104        msg = os.path.basename(sys.argv[0]) + " [-test]"
    103105        try:
    104106            self.logger.errorPair("Usage:", msg)
Note: See TracChangeset for help on using the changeset viewer.