Ignore:
Timestamp:
6 Jun 2011, 13:01:39 (14 years ago)
Author:
uli
Message:

Remove trailing whitespace.

File:
1 edited

Legend:

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

    r4996 r6286  
    3636        super(DataCenter, self).__init__(*args, **kw)
    3737        self._createSubDirs()
    38        
     38
    3939    def _setupLogger(self, logger):
    4040        """Setup datacenter logger.
     
    5151            '%(asctime)s - %(levelname)s - %(message)s')
    5252        handler.setFormatter(formatter)
    53        
     53
    5454        # Here we decide, whether our messages will _also_ go to
    5555        # application log.
     
    6868            os.mkdir(path)
    6969        return
    70    
     70
    7171    def getFiles(self, sort='name'):
    7272        """Get a list of files stored in `storage`.
     
    101101                LogFile(os.path.join(self.storage, 'logs', name)))
    102102        return result
    103            
     103
    104104    def setStoragePath(self, path, move=False, overwrite=False):
    105105        """Set the path where to store files.
     
    135135        shutil.copystat(source, dest)
    136136        os.unlink(source)
    137    
     137
    138138    def distProcessedFiles(self, successful, source_path, finished_file,
    139139                           pending_file, mode='create', move_orig=True):
     
    153153        afterwards. Regular importers should put their stuff in
    154154        dedicated temporary dirs.
    155        
     155
    156156        See datacenter.txt for more info about how this works.
    157157        """
     
    168168                basename = maybe_basename
    169169                pending = True
    170                
     170
    171171        base, ext = os.path.splitext(basename)
    172172        finished_name = "%s.%s.finished%s" % (base, mode, ext)
     
    200200        return
    201201
    202    
     202
    203203class DataCenterFile(object):
    204204    """A description of a file stored in data center.
    205205    """
    206206    grok.implements(IDataCenterFile)
    207    
     207
    208208    def __init__(self, context):
    209209        self.context = context
     
    223223        """
    224224        return os.path.getctime(self.context)
    225    
     225
    226226    def getSize(self):
    227227        """Get a human readable file size.
     
    244244            num += 1
    245245        return num
    246    
     246
    247247class LogFile(DataCenterFile):
    248248    """A description of a log file.
     
    277277        if marker in self._markers.keys():
    278278            return self._markers[marker]
    279    
     279
    280280    def getUserId(self):
    281281        return self._getMarker('user') or '<UNKNOWN>'
Note: See TracChangeset for help on using the changeset viewer.