Fix the directory handling to make it more os-portable, using os.join()
instead of hardcoded paths.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
class config (object):
"""A simple class to hold the default configs for the whole program"""
class config (object):
"""A simple class to hold the default configs for the whole program"""
- DEFAULT_CONFIG='~/.config/rarslave2/rarslave2.conf'
+ DEFAULT_CONFIG=os.path.join ('~','.config','rarslave2','rarslave2.conf')
def __read_config(self, filename=DEFAULT_CONFIG):
"""Attempt to open and read the rarslave config file"""
def __read_config(self, filename=DEFAULT_CONFIG):
"""Attempt to open and read the rarslave config file"""
def __init__(self):
self.__defaults = {
def __init__(self):
self.__defaults = {
- ('directories', 'working_directory') : '~/downloads/usenet',
+ ('directories', 'working_directory') : os.path.join ('~','downloads','usenet'),
('directories', 'extract_directory') : None,
('options', 'recursive') : True,
('options', 'interactive') : False,
('directories', 'extract_directory') : None,
('options', 'recursive') : True,
('options', 'interactive') : False,