Changeset 653

Show
Ignore:
Timestamp:
2006-11-23 17:25:29 (2 years ago)
Author:
schwa
Message:
Renamed method `ignore_line` to `ignores_line` to better describe
that it returns a boolean value. Moreover,
`parser.ignores_line(line)` reads better than
`parser.ignore_line(line)`. The latter seems to say that the line
is always ignored.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ftp_stat.py

    r652 r653  
    7474    _total_regex = re.compile(r"^total\s+\d+") 
    7575 
    76     def ignore_line(self, line): 
     76    def ignores_line(self, line): 
    7777        """ 
    7878        Return a true value if the line should be ignored, i. e. is 
     
    388388        names = [] 
    389389        for line in lines: 
    390             if self._parser.ignore_line(line): 
     390            if self._parser.ignores_line(line): 
    391391                continue 
    392392            # for `listdir`, we are interested in just the names, 
     
    436436        lines = self._host_dir(dirname) 
    437437        for line in lines: 
    438             if self._parser.ignore_line(line): 
     438            if self._parser.ignores_line(line): 
    439439                continue 
    440440            stat_result = self._parser.parse_line(line, 
  • trunk/ftputil.py

    r647 r653  
    268268 
    269269        - The parser has to implement two methods, `parse_line` and 
    270           `ignore_line`. For the latter, there's a probably useful 
     270          `ignores_line`. For the latter, there's a probably useful 
    271271          default in the class `ftp_stat.Parser`. 
    272272 
     
    276276          a useful error message. 
    277277 
    278         - `ignore_line` should return a true value if the line isn't 
     278        - `ignores_line` should return a true value if the line isn't 
    279279          assumed to contain stat information. 
    280280        """