main(): Fixed logic error and reporting when no colordb was found.
Given by GvR.
\f
def usage(status, msg=''):
+ print __doc__ % globals()
if msg:
print msg
- print __doc__ % globals()
sys.exit(status)
for f in RGB_TXT:
try:
colordb = ColorDB.get_colordb(f)
- break
+ if colordb:
+ break
except IOError:
pass
else:
- raise IOError('No color database file found')
+ usage(1, 'No color database file found, see the -d option.')
# get triplet for initial color
try: