Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 898230
Collapse All | Expand All

(-)a/src/pkgcheck/scripts/pkgcheck_scan.py (-1 / +1 lines)
Lines 401-407 def _setup_scan(parser, namespace, args): Link Here
401
    # load repo-specific args from config if they exist
401
    # load repo-specific args from config if they exist
402
    namespace = config_parser.parse_config_sections(namespace, namespace.target_repo.aliases)
402
    namespace = config_parser.parse_config_sections(namespace, namespace.target_repo.aliases)
403
403
404
    if os.getenv("NOCOLOR"):
404
    if os.getenv("NO_COLOR"):
405
        namespace.color = False
405
        namespace.color = False
406
406
407
    return namespace, args
407
    return namespace, args
(-)a/tests/scripts/test_pkgcheck_scan.py (-5 / +4 lines)
Lines 279-290 class TestPkgcheckScanParseArgs: Link Here
279
        )
279
        )
280
280
281
        args = ("scan", "--config", str(config_file))
281
        args = ("scan", "--config", str(config_file))
282
        with os_environ("NOCOLOR"):
282
        with os_environ("NO_COLOR"):
283
            assert parser.parse_args(args).color is True
283
            assert parser.parse_args(args).color is True
284
        with os_environ(NOCOLOR="1"):
284
        with os_environ(NO_COLOR="1"):
285
            # NOCOLOR overrides config file
285
            # NO_COLOR overrides config file
286
            assert parser.parse_args(args).color is False
286
            assert parser.parse_args(args).color is False
287
            # cmd line option overrides NOCOLOR
287
            # cmd line option overrides NO_COLOR
288
            assert parser.parse_args([*args, "--color", "n"]).color is False
288
            assert parser.parse_args([*args, "--color", "n"]).color is False
289
            assert parser.parse_args([*args, "--color", "y"]).color is True
289
            assert parser.parse_args([*args, "--color", "y"]).color is True
290
290
291
- 

Return to bug 898230