Extend lookup path for notoconfig.
Now also looks in /usr/local/share/noto/config if it exists, so a
non-user-specific location is available for the notoconfig data.
@@ -40,7 +40,8 @@ def _setup():
values will hold a mapping from the <name> to value.
Blank lines and lines starting with '#' are ignored."""
- configfile = path.expanduser("~/.notoconfig")
+ paths = [path.expanduser('~/.notoconfig'), '/usr/local/share/noto/config']
+ for configfile in paths:
if path.exists(configfile):
with open(configfile, "r") as f:
for line in f:
@@ -49,11 +50,10 @@ def _setup():
continue
k, v = line.split('=', 1)
values[k.strip()] = v.strip()
- else:
+ break
# This needs to be silent. It causes a makefile error in noto-emoji,
# which expects stdout to consist only of the output of a python
# script it runs.
- pass
_setup()
