1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-09-28 22:15:23 +08:00

double check day-of-week value, even though it shouldn't match

This commit is contained in:
Joel Bender 2015-09-07 21:55:21 -04:00
parent 1d9ea1bc73
commit 72fdddaf33
3 changed files with 12 additions and 0 deletions

View File

@ -1219,6 +1219,10 @@ class Date(Atomic):
pass
else:
day_of_week = int(day_of_week)
if (day_of_week == 255):
pass
elif day_of_week > 7:
raise ValueError("invalid day of week")
# year becomes the correct octet
if year != 255:

View File

@ -1225,6 +1225,10 @@ class Date(Atomic):
pass
else:
day_of_week = int(day_of_week)
if (day_of_week == 255):
pass
elif day_of_week > 7:
raise ValueError("invalid day of week")
# year becomes the correct octet
if year != 255:

View File

@ -1233,6 +1233,10 @@ class Date(Atomic):
pass
else:
day_of_week = int(day_of_week)
if (day_of_week == 255):
pass
elif day_of_week > 7:
raise ValueError("invalid day of week")
# year becomes the correct octet
if year != 255: