[Spambayes-checkins] spambayes/spambayes OptionsClass.py,1.13,1.14
Skip Montanaro
montanaro at users.sourceforge.net
Thu Nov 6 17:01:26 EST 2003
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv18668
Modified Files:
OptionsClass.py
Log Message:
error messages go to sys.stderr...
Index: OptionsClass.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/OptionsClass.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** OptionsClass.py 9 Sep 2003 07:53:56 -0000 1.13
--- OptionsClass.py 6 Nov 2003 22:01:23 -0000 1.14
***************
*** 185,189 ****
r = re.compile(self.allowed_values)
except:
! print self.allowed_values
raise
s = str(value)
--- 185,189 ----
r = re.compile(self.allowed_values)
except:
! print >> sys.stderr, self.allowed_values
raise
s = str(value)
***************
*** 383,387 ****
# be added to it
if self.verbose:
! print "Creating new configuration file", filename
f = file(filename, "w")
f.close()
--- 383,388 ----
# be added to it
if self.verbose:
! print >> sys.stderr, "Creating new configuration file",
! print >> sys.stderr, filename
f = file(filename, "w")
f.close()
***************
*** 504,509 ****
option = opt
if not self._options.has_key((section, option)):
! print "Invalid option %s in section %s in file %s" % \
! (opt, sect, filename)
else:
if self.multiple_values_allowed(section, option):
--- 505,511 ----
option = opt
if not self._options.has_key((section, option)):
! print >> sys.stderr, ("Invalid option %s in"
! " section %s in file %s" %
! (opt, sect, filename))
else:
if self.multiple_values_allowed(section, option):
***************
*** 569,575 ****
self._options[sect, opt].set(val)
else:
! print "Attempted to set [%s] %s with invalid value %s (%s)" % \
! (sect, opt, val, type(val))
!
def __setitem__(self, key, value):
self.set(key[0], key[1], value)
--- 571,578 ----
self._options[sect, opt].set(val)
else:
! print >> sys.stderr, ("Attempted to set [%s] %s with invalid"
! " value %s (%s)" %
! (sect, opt, val, type(val)))
!
def __setitem__(self, key, value):
self.set(key[0], key[1], value)
More information about the Spambayes-checkins
mailing list