IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 14, 2012, 12:02:48 PM (14 years ago)
Author:
rhenders
Message:

Big changes to support a new Config class that encapuslates the xml config file

File:
1 edited

Legend:

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

    r32835 r33259  
    1919
    2020    '''
    21     def __init__(self, logger, doc, ippToPspsDb):
     21    def __init__(self, logger, config, ippToPspsDb):
    2222   
    2323        # setup logger
    2424        self.logger = logger
    25         self.doc = doc
     25        self.config = config
    2626        self.ippToPspsDb = ippToPspsDb
    27         self.logger.debug("Datastore constructor")
    28 
    29         # open config
    30         self.product = doc.find("datastore/product").text
    31         self.type = doc.find("datastore/type").text
    32 
    33         self.logger.debug("Using product: '" + self.product + "' and type: '" + self.type + "'")
    3427
    3528    '''
     
    4942        command  = "dsreg --add " + name + "\
    5043                    --link --datapath " + path + "\
    51                     --type " + self.type + "\
    52                     --product " + self.product + "\
     44                    --type " + self.config.datastoreType + "\
     45                    --product " + self.config.datastoreProduct + "\
    5346                    --list " + tempFile.name
    5447
     
    8275                   --del " + name + " \
    8376                   --rm \
    84                    --product " + self.product
     77                   --product " + self.config.datastoreProduct
    8578
    8679        p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE)
Note: See TracChangeset for help on using the changeset viewer.