IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 9, 2011, 1:00:29 PM (15 years ago)
Author:
rhenders
Message:

added method to remove a range of batches from the datastore

File:
1 edited

Legend:

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

    r31985 r32058  
    5151
    5252        if p.returncode != 0:
    53             self.logger.error("Datastore publish failed")
     53            self.logger.errorPair("Datastore publish",  "failed")
    5454            ret = False
    5555        else:
     
    6363
    6464    '''
    65     Removes an item to the datastore
     65    Removes an item from the datastore
    6666    '''
    6767    def remove(self, name):
     
    7676
    7777        if p.returncode != 0:
    78             self.logger.error("Datastore removal of " + name + " failed")
     78            self.logger.errorPair("Datastore removal failed",  name)
    7979            ret = False
    8080        else:
     
    8484        return ret
    8585
     86    '''
     87    Removes a range of items from the datastore
     88    '''
     89    def removeRange(self, first, last):
     90
     91        firstInt = int(first[1:])
     92        lastInt = int(last[1:])
     93
     94        for i in range(firstInt, lastInt):
     95           
     96            self.remove("B%08d" % i)
Note: See TracChangeset for help on using the changeset viewer.