def parse_section(self, section=None): listfile = self._listfile_(section) debug(listfile) if not isfile(listfile): raise NoFileError, 'file not there' if self.source.type == 'deb': return parse_packages(listfile) elif self.source.type == 'deb-src': return parse_sources(listfile) else: raise Error, 'bad source type'
def parse_section(self, section=None): listfile = self._listfile_(section) debug(listfile) if not isfile(listfile): raise NoFileError, "file not there" if self.source.type == "deb": return parse_packages(listfile) elif self.source.type == "deb-src": return parse_sources(listfile) else: raise RuntimeError, "bad source type"