Skip to content

Commit

Permalink
Merge branch 'fix6'
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
pierky committed Jul 10, 2017
2 parents d6112fc + fe07c08 commit 21bd2ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pierky/arouteserver/config/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ def _reset_to_default(self):
def load(self, path):
self._reset_to_default()

if not os.path.exists(path):
if not os.path.exists(os.path.expanduser(path)):
raise MissingFileError(path)

try:
with open(path, "r") as f:
with open(os.path.expanduser(path), "r") as f:
cfg_from_file = yaml.safe_load(f.read())
if cfg_from_file:
for key in cfg_from_file:
Expand All @@ -99,7 +99,7 @@ def load(self, path):
if self.cfg["cfg_dir"]:
self.cfg["cfg_dir"] = os.path.expanduser(self.cfg["cfg_dir"])
else:
self.cfg["cfg_dir"] = os.path.dirname(path)
self.cfg["cfg_dir"] = os.path.dirname(os.path.expanduser(path))

# relative path -> absolute path
for cfg_key in self.PATH_KEYS:
Expand Down

0 comments on commit 21bd2ae

Please sign in to comment.