Changeset 4892


Ignore:
Timestamp:
25 Jan 2010, 08:32:07 (15 years ago)
Author:
uli
Message:

Create 'pending' and 'finished' subdirs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/trunk/src/waeup/datacenter.py

    r4883 r4892  
    3636        return logger
    3737
     38    def __init__(self, *args, **kw):
     39        super(DataCenter, self).__init__(*args, **kw)
     40        self._createSubDirs()
     41       
    3842    def _setupLogger(self, logger):
    3943        """Setup datacenter logger.
     
    5862        return logger
    5963
     64    def _createSubDirs(self):
     65        """Create standard subdirs.
     66        """
     67        for name in ['finished', 'pending']:
     68            path = os.path.join(self.storage, name)
     69            if os.path.exists(path):
     70                continue
     71            os.mkdir(path)
     72        return
     73   
    6074    def getReceivers(self):
    6175        receivers = []
     
    144158                                            overwrite=overwrite)
    145159        self.storage = path
     160        self._createSubDirs()
    146161        # Adjust logger...
    147162        logger = self.logger
Note: See TracChangeset for help on using the changeset viewer.