diff --git a/bin/euscan b/bin/euscan index 4bbbec9..ade3993 100755 --- a/bin/euscan +++ b/bin/euscan @@ -28,12 +28,10 @@ from portage.output import white, yellow, turquoise, green from portage.exception import AmbiguousPackageName from gentoolkit import pprinter as pp -from gentoolkit.eclean.search import (port_settings) +from gentoolkit.eclean.search import port_settings from gentoolkit.errors import GentoolkitException from euscan import CONFIG, output -from euscan.scan import scan_upstream -from euscan.out import progress_bar # Globals @@ -216,6 +214,7 @@ def parse_args(): def main(): """Parse command line and execute all actions.""" + CONFIG['nocolor'] = ( port_settings["NOCOLOR"] in ('yes', 'true') or not isatty ) @@ -242,6 +241,10 @@ def main(): print_usage(e.value) exit_helper(EINVAL) + # Importing stuff here for performance reasons + from euscan.scan import scan_upstream + from euscan.out import progress_bar + if CONFIG['verbose'] > 2: HTTPConnection.debuglevel = 1