Skip to content

Commit 25f86fa

Browse files
authored
Merge pull request #1828 from UlrichB22/fix-1824
Fix UnboundLocalError in import19
2 parents 5c5732b + a93e8eb commit 25f86fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/moin/cli/migration/moin19/import19.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ def __init__(self, item, revno, path, target_namespace, latest_rev_only=False):
553553
MTIME: int(os.path.getmtime(path)),
554554
ACTION: ACTION_SAVE,
555555
}
556+
else:
557+
raise NoSuchRevisionError(f"Item {item.name!r} has no revision {revno}.")
556558
meta, data = split_body(content)
557559
meta.update(editlog_data)
558560
format = meta.pop("format", self.backend.format_default)

0 commit comments

Comments
 (0)