1
0
mirror of https://github.com/vikstrous/pirate-get synced 2025-01-09 09:59:51 +01:00

fix color config

fix #105
This commit is contained in:
Viktor Stanchev 2017-06-18 12:22:27 -07:00
parent f3d8aefd32
commit 6e9e922d92

View File

@ -167,8 +167,8 @@ def parse_args(args_in):
type=str, metavar='DIRECTORY',
help='directory where to save downloaded files'
' (if none is given $PWD will be used)')
parser.add_argument('--disable-colors', dest='color',
action='store_false',
parser.add_argument('--disable-colors', dest='disable_color',
action='store_true',
help='disable colored output')
parser.add_argument('-m', '--mirror',
type=str, nargs='+',
@ -203,9 +203,10 @@ def combine_configs(config, args):
if not args.database:
args.database = config.get('LocalDB', 'path')
if not args.color or not config.getboolean('Misc', 'colors'):
# TODO: consider how this can be moved to the args
pirate.data.colored_output = False
if args.disable_color or config.getboolean('Misc', 'colors') == False:
args.color = False
else:
args.color = True
if not args.save_directory:
args.save_directory = config.get('Save', 'directory')