Remove the ability to execute the "value" field. It is not used and we don't want Python code in holidays.xml.

svn: r11937
This commit is contained in:
Brian Matherly 2009-02-09 13:39:33 +00:00
parent 2e976ddf76
commit 6e661e9cf2

View File

@ -310,10 +310,6 @@ class _Holidays:
else:
# must be a dayname
offset = rule["offset"]
if len(rule["value"]) > 0 and rule["value"][0] == '>':
# eval exp -> year/num[/day[/month]]
y, m, d = date.year, date.month, date.day
rule["value"] = eval(rule["value"][1:])
if self.debug:
print "rule['value']:", rule["value"]
@ -337,6 +333,7 @@ class _Holidays:
print "num =", num
d = dates_of_dayname[int(num)]
elif rule["value"].count("/") == 2: # year/month/day
y, m, d = rule["value"].split("/")
if y == "*":