Try to trap a bug
svn: r174
This commit is contained in:
@ -355,7 +355,11 @@ class SingleDate:
|
|||||||
#
|
#
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
def setMonth(self,val):
|
def setMonth(self,val):
|
||||||
self.month = val - 1
|
if val > 12:
|
||||||
|
self.month = -1
|
||||||
|
print "Bad month index : %d" % val
|
||||||
|
else:
|
||||||
|
self.month = val - 1
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -549,7 +553,7 @@ class SingleDate:
|
|||||||
elif self.year == -1:
|
elif self.year == -1:
|
||||||
month = SingleDate.mname[self.month]
|
month = SingleDate.mname[self.month]
|
||||||
retval = string.upper(month[0:3])
|
retval = string.upper(month[0:3])
|
||||||
else:
|
else:
|
||||||
month = SingleDate.mname[self.month]
|
month = SingleDate.mname[self.month]
|
||||||
retval = "%s %d" % (string.upper(month[0:3]),self.year)
|
retval = "%s %d" % (string.upper(month[0:3]),self.year)
|
||||||
elif self.month == -1:
|
elif self.month == -1:
|
||||||
|
Reference in New Issue
Block a user