Commit c0e64473 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Obtain user home directory in an OS independent way.

$HOME is not set on every operating system (can you guess which one?).
This resulted in errors because a configuration file path was
constructed using an empty string.

So use a different approach that should work for most major OS's.
parent 97897e20
......@@ -90,7 +90,7 @@ class _Config:
self.cp.add_section(section)
def _home_config_path(self):
return os.path.join(os.getenv('HOME'), '.topydo')
return os.path.join(os.path.expanduser('~'), '.topydo')
def default_command(self):
return self.cp.get('topydo', 'default_command')
......
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