-import logging
#
# Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license.
#
if fd is not None:
fd = fd()
- if fd in (1, 2): # stdout or stderr
+ if fd in (1, 2): # stdout or stderr
h = ctypes.windll.kernel32.GetStdHandle(-10 - fd)
while parts:
elif 30 <= p <= 37:
color |= self.nt_color_map[p - 30]
elif p == 1:
- color |= 0x08 # foreground intensity on
- elif p == 0: # reset to default color
+ color |= 0x08 # foreground intensity on
+ elif p == 0: # reset to default color
color = 0x07
else:
- pass # error condition ignored
+ pass # error condition ignored
ctypes.windll.kernel32.SetConsoleTextAttribute(h, color)
prefix = ""
message = "%s%s" % (prefix, ''.join((self.csi, ';'.join(params),
- 'm', message, self.reset)))
+ 'm', message, self.reset)))
return message