diff --git a/doku2git.py b/doku2git.py index 936bec0..c091109 100755 --- a/doku2git.py +++ b/doku2git.py @@ -324,7 +324,7 @@ class Dokuwiki: found[None] = User(login="system", real_name="system", email="system@mlug-au.org") return found - def _find_meta(self, root: str, type): + def _find_meta(self, root: str, klass): for dirpath, dirnames, filenames in os.walk(root): for file in filenames: # We don't really care about 'indexed' or 'meta' files. @@ -339,10 +339,10 @@ class Dokuwiki: # Actually read the metadata path = os.path.join(dirpath, file) - for change in self._read_meta(path, type): + for change in self._read_meta(path, klass): yield change - def _read_meta(self, path: str, type): + def _read_meta(self, path: str, klass): log.debug("extracting meta from %s", path) with open(path, 'r') as data: for entry in data: @@ -358,7 +358,7 @@ class Dokuwiki: raise RuntimeError("Empty user doesn't correspond to 'external edit'") user = None - yield type( + yield klass( timestamp=timestamp, ip=ip, operation=operation,