def scan(self, path): paths = path_lib.find_files(path_to_data_dir(path)) uris = (path_lib.path_to_uri(p) for p in paths) scanner = Scanner() for uri in uris: key = uri[len('file://'):] try: self.data[key] = scanner.scan(uri) except exceptions.ScannerError as error: self.errors[key] = error
def scan(self, path): scanner = Scanner(path_to_data_dir(path), self.data_callback, self.error_callback) scanner.start()