doku2git: Avoid shadowing the type
function.
This commit is contained in:
parent
a244617c56
commit
e0092a365b
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user