Commit c4a9b3d9 authored by Barry Warsaw's avatar Barry Warsaw

main(): Better recovery when bogus color given on command line

parent b7b1cf00
...@@ -103,10 +103,9 @@ def main(): ...@@ -103,10 +103,9 @@ def main():
try: try:
red, green, blue = ColorDB.rrggbb_to_triplet(initialcolor) red, green, blue = ColorDB.rrggbb_to_triplet(initialcolor)
except ColorDB.BadColor: except ColorDB.BadColor:
print 'Bad initial color, using default: %s' % initialcolor
initialcolor = 'grey50'
try: try:
red, green, blue = ColorDB.rrggbb_to_triplet(initialcolor) red, green, blue = ColorDB.rrggbb_to_triplet('#7f7f7f')
print 'Bad initial color, using gray50:', initialcolor
except ColorDB.BadColor: except ColorDB.BadColor:
usage(1, 'Cannot find an initial color to use') usage(1, 'Cannot find an initial color to use')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment