Changeset 4908


Ignore:
Timestamp:
27 Jan 2010, 13:16:44 (15 years ago)
Author:
uli
Message:

Let getLogFiles find the real log files.

File:
1 edited

Legend:

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

    r4906 r4908  
    136136
    137137    def getLogFiles(self):
    138         """Get a list of .msg files.
     138        """Get the files from logs/ subdir. Files are sorted by name.
    139139        """
    140140        result = []
    141         files = self.getFiles()
    142         for file in files:
    143             if not file.name.endswith('.msg'):
     141        logdir = os.path.join(self.storage, 'logs')
     142        if not os.path.exists(logdir):
     143            os.mkdir(logdir)
     144        for name in sorted(os.listdir(logdir)):
     145            if not os.path.isfile(os.path.join(logdir, name)):
    144146                continue
    145147            result.append(
    146                 LogFile(os.path.join(self.storage, file.name)))
     148                LogFile(os.path.join(self.storage, 'logs', name)))
    147149        return result
    148150           
Note: See TracChangeset for help on using the changeset viewer.