Skip to content

Commit

Permalink
ocrd.processor.base: also init old_pwd when no workspace yet
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Jun 9, 2021
1 parent 2949925 commit ccb369a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ocrd/ocrd/processor/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def __init__(
# FIXME HACK would be better to use pushd_popd(self.workspace.directory)
# but there is no way to do that in process here since it's an
# overridden method. chdir is almost always an anti-pattern.
self.old_pwd = getcwd()
if self.workspace:
self.old_pwd = getcwd()
os.chdir(self.workspace.directory)
Expand Down

0 comments on commit ccb369a

Please sign in to comment.