Skip to content

Commit

Permalink
Merge pull request #106 from vikstrous/color-config-fix
Browse files Browse the repository at this point in the history
fix color config
  • Loading branch information
vikstrous authored Jun 18, 2017
2 parents f3d8aef + 6e9e922 commit c04b7ec
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pirate/pirate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='+',
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit c04b7ec

Please sign in to comment.