0003428: When running with pythonw.exe, Windows may crash if you write to stdout. Some more print statements changed to log.warning.

svn: r21510
This commit is contained in:
Tim G L Lyons
2013-03-01 13:12:20 +00:00
parent 0a0d77d6db
commit 4697de789c
2 changed files with 17 additions and 4 deletions

View File

@@ -31,6 +31,13 @@ Option class representing an enumerated list of possible values.
#-------------------------------------------------------------------------
from gen.plug.menu import Option
#-------------------------------------------------------------------------
#
# set up logging
#
#-------------------------------------------------------------------------
import logging
#-------------------------------------------------------------------------
#
# EnumeratedListOption class
@@ -113,5 +120,5 @@ class EnumeratedListOption(Option):
if value in (v for v, d in self.__items):
Option.set_value(self, value)
else:
print "Value '%s' not found for option '%s'" % (str(value),
self.get_label())
logging.warning(_("Value '%(val)s' not found for option '%(opt)s'") %
{'val' : str(value), 'opt' : self.get_label()})