Minor changes

- use functions instead of lambda
- dont use color for non-terminal tty's
- add --temp argument for blendfile_pack
This commit is contained in:
2016-01-29 17:47:57 +11:00
parent 4d6b5bf4c0
commit 5f5baf33b2
5 changed files with 45 additions and 20 deletions

View File

@@ -16,6 +16,9 @@
#
# ***** END GPL LICENCE BLOCK *****
def colorize_dummy(msg, color=None):
return msg
_USE_COLOR = True
if _USE_COLOR:
color_codes = {
@@ -41,8 +44,7 @@ if _USE_COLOR:
def colorize(msg, color=None):
return (color_codes[color] + msg + color_codes['normal'])
else:
def colorize(msg, color=None):
return msg
colorize = colorize_dummy
def uuid_from_file(fn, block_size=1 << 20):