Ignore:
Timestamp:
18 Jan 2010, 06:53:41 (15 years ago)
Author:
uli
Message:

DataCenterFile? not support lines attribute, that counts number of
lines of a file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-importers/src/waeup/datacenter.py

    r4822 r4849  
    202202        self.size = self.getSize()
    203203        self.uploaddate = self.getDate()
     204        self.lines = self.getLinesNumber()
    204205
    205206    def getDate(self):
     
    222223        return size
    223224
     225    def getLinesNumber(self):
     226        """Get number of lines.
     227        """
     228        num = 0
     229        for line in open(self.context, 'rb'):
     230            num += 1
     231        return num
     232   
    224233class LogFile(DataCenterFile):
    225234    """A description of a log file.
Note: See TracChangeset for help on using the changeset viewer.