Loading bin/is +6 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ import re import fnmatch import warnings import installsystems import installsystems.printer import installsystems.tools as istools import installsystems.argparse as argparse # to be removed when python2.7 from installsystems.printer import * Loading Loading @@ -318,6 +319,8 @@ p_main.add_argument("-C", "--cache", default=None, help="path of the repository cache") p_main.add_argument("--no-cache", action="store_true", default=False, help="not use persistent db caching") p_main.add_argument("--no-color", action="store_true", default=False, help="dot not display colored output") p_main.add_argument("-t", "--timeout", dest="timeout", type=int, default=3, help="download timeout (default 3)") Loading Loading @@ -499,6 +502,9 @@ try: # no warning if we are not in debug mode if not installsystems.debug: warnings.filterwarnings("ignore") # disable coloring if asked if args.no_color: installsystems.printer.NOCOLOR = True # except for install command we parse all args! if args.func is not c_install: args = p_main.parse_args(namespace=args) Loading installsystems/printer.py +7 −5 Original line number Diff line number Diff line Loading @@ -10,7 +10,9 @@ import sys import os import installsystems color = { NOCOLOR = False COLOR = { # regular "black": "\033[30m", "B": "\033[30m", Loading Loading @@ -46,11 +48,11 @@ def out(message="", fd=sys.stdout, endl=os.linesep, flush=True): Print message colorised in fd ended by endl ''' # color subsitution for c in color: if fd.isatty(): message = message.replace("#%s#" % c, color[c]) else: for c in COLOR: if not fd.isatty() or NOCOLOR: message = message.replace("#%s#" % c, "") else: message = message.replace("#%s#" % c, COLOR[c]) # convert unicode into str before write # this can cause issue on python 2.6 if type(message) == unicode: Loading samples/installsystems.conf +3 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,9 @@ # disable cache of remote repository #no_cache = 1 # disable output coloring #no_color = 1 # disable check of script during build #no_check = 1 Loading Loading
bin/is +6 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ import re import fnmatch import warnings import installsystems import installsystems.printer import installsystems.tools as istools import installsystems.argparse as argparse # to be removed when python2.7 from installsystems.printer import * Loading Loading @@ -318,6 +319,8 @@ p_main.add_argument("-C", "--cache", default=None, help="path of the repository cache") p_main.add_argument("--no-cache", action="store_true", default=False, help="not use persistent db caching") p_main.add_argument("--no-color", action="store_true", default=False, help="dot not display colored output") p_main.add_argument("-t", "--timeout", dest="timeout", type=int, default=3, help="download timeout (default 3)") Loading Loading @@ -499,6 +502,9 @@ try: # no warning if we are not in debug mode if not installsystems.debug: warnings.filterwarnings("ignore") # disable coloring if asked if args.no_color: installsystems.printer.NOCOLOR = True # except for install command we parse all args! if args.func is not c_install: args = p_main.parse_args(namespace=args) Loading
installsystems/printer.py +7 −5 Original line number Diff line number Diff line Loading @@ -10,7 +10,9 @@ import sys import os import installsystems color = { NOCOLOR = False COLOR = { # regular "black": "\033[30m", "B": "\033[30m", Loading Loading @@ -46,11 +48,11 @@ def out(message="", fd=sys.stdout, endl=os.linesep, flush=True): Print message colorised in fd ended by endl ''' # color subsitution for c in color: if fd.isatty(): message = message.replace("#%s#" % c, color[c]) else: for c in COLOR: if not fd.isatty() or NOCOLOR: message = message.replace("#%s#" % c, "") else: message = message.replace("#%s#" % c, COLOR[c]) # convert unicode into str before write # this can cause issue on python 2.6 if type(message) == unicode: Loading
samples/installsystems.conf +3 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,9 @@ # disable cache of remote repository #no_cache = 1 # disable output coloring #no_color = 1 # disable check of script during build #no_check = 1 Loading