mirror of
https://github.com/nikdoof/tvorganise.git
synced 2026-01-30 09:38:20 +00:00
Use expanduser instead of depending on ENV to be setup correctly.
This allows for a bit of cross platform compatability, as usually Windows doesn't have $HOME set.
This commit is contained in:
@@ -167,7 +167,7 @@ class TvOrganiser():
|
|||||||
if os.path.exists(opts.config):
|
if os.path.exists(opts.config):
|
||||||
cfile = opts.config
|
cfile = opts.config
|
||||||
else:
|
else:
|
||||||
for path in [ '%s/.tvorganise.cfg' % os.environ['HOME'], '/etc/tvorganise.cfg']:
|
for path in [ os.path.expanduser('~/.tvorganise.cfg'), '/etc/tvorganise.cfg']:
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
cfile = path
|
cfile = path
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user