Merge branch 'bwq-datadir_option' into develop
This commit is contained in:
+6
-1
@@ -35,7 +35,12 @@ class Loader(object):
|
||||
settings.setFile(self.options.config_file)
|
||||
|
||||
# Create data dir if needed
|
||||
self.data_dir = os.path.expanduser(Env.setting('data_dir'))
|
||||
if self.options.data_dir:
|
||||
self.data_dir = self.options.data_dir
|
||||
|
||||
else:
|
||||
self.data_dir = os.path.expanduser(Env.setting('data_dir'))
|
||||
|
||||
if self.data_dir == '':
|
||||
self.data_dir = getDataDir()
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ def getOptions(base_path, args):
|
||||
parser = ArgumentParser(prog = 'CouchPotato.py')
|
||||
parser.add_argument('--config_file', default = os.path.join(data_dir, 'settings.conf'),
|
||||
dest = 'config_file', help = 'Absolute or ~/ path of the settings file (default ./_data/settings.conf)')
|
||||
parser.add_argument('--data_dir', default = data_dir,
|
||||
dest = 'data_dir', help = 'Absolute or ~/ path of the data dir')
|
||||
parser.add_argument('--debug', action = 'store_true',
|
||||
dest = 'debug', help = 'Debug mode')
|
||||
parser.add_argument('--console_log', action = 'store_true',
|
||||
|
||||
Reference in New Issue
Block a user