Unverified Commit d6a65700 authored by Philipp Zumstein's avatar Philipp Zumstein Committed by GitHub
Browse files

Merge pull request #268 from tmbdev/windows-sysconfig

🐛 Do not add $datarootdir/ocropus to model if it is None
parents 61562ce9 113c38ad
......@@ -621,8 +621,10 @@ def ocropus_find_file(fname, gz=True):
possible_prefixes.append("/usr/local/share/ocropus")
possible_prefixes.append(os.path.join(
sysconfig.get_config_var("datarootdir"), "ocropus"))
# datarootdir is None in windows so don't add it to search list
if sysconfig.get_config_var("datarootdir") is not None:
possible_prefixes.append(os.path.join(
sysconfig.get_config_var("datarootdir"), "ocropus"))
# Unique entries with preserved order in possible_prefixes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment