Ignore:
Timestamp:
21 Sep 2012, 08:19:35 (12 years ago)
Author:
uli
Message:

Rollback r9209. Looks like multiple merges from trunk confuse svn when merging back into trunk.

Location:
main/waeup.kofa/branches/uli-zc-async
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-zc-async

  • main/waeup.kofa/branches/uli-zc-async/src/waeup/kofa/datacenter.py

    r9209 r9211  
    6767        return os.path.join(self.storage, 'deleted')
    6868
    69     def getPendingFiles(self, sort='name'):
     69    def getFiles(self, sort='name'):
    7070        """Get a list of files stored in `storage`.
    7171
     
    7979            if not os.path.isfile(fullpath):
    8080                continue
    81             if not filename.endswith('.csv'):
    82                 continue
    8381            result.append(DataCenterFile(fullpath))
    8482        if sort == 'date':
     
    8684            result = sorted(result, key=lambda x: x.getTimeStamp(),
    8785                            reverse=True)
    88         return result
    89 
    90     def getFinishedFiles(self):
    91         """Get a list of files stored in `finished` subfolder of `storage`.
    92 
    93         Files are unsorted.
    94         """
    95         result = []
    96         finished_dir = os.path.join(self.storage, 'finished')
    97         if not os.path.exists(finished_dir):
    98             return result
    99         for filename in sorted(os.listdir(finished_dir)):
    100             fullpath = os.path.join(finished_dir, filename)
    101             if not os.path.isfile(fullpath):
    102                 continue
    103             if not filename.endswith('.csv'):
    104                 continue
    105             result.append(DataCenterFile(fullpath, 'finished'))
    10686        return result
    10787
     
    164144            return
    165145        result_path = merge_csv_files(dest, source)
    166         os.chmod(result_path, 0664)
    167146        self._moveFile(result_path, dest)
    168147        os.unlink(source)
     
    319298    grok.implements(IDataCenterFile)
    320299
    321     def __init__(self, context, folder_name=''):
     300    def __init__(self, context):
    322301        self.context = context
    323302        self.name = os.path.basename(self.context)
    324         self.rel_path = os.path.join(folder_name, self.name)
    325303        self.size = self.getSize()
    326304        self.uploaddate = self.getDate()
Note: See TracChangeset for help on using the changeset viewer.