Last change
on this file since 2574 was
1191,
checked in by broder, 16 years ago
|
Strip the sipb-xen prefix from packages we didn't write
|
File size:
862 bytes
|
Rev | Line | |
---|
[377] | 1 | Index: pydhcplib/dhcp_basic_packet.py |
---|
| 2 | =================================================================== |
---|
[1191] | 3 | --- python-pydhcplib/pydhcplib/dhcp_basic_packet.py |
---|
| 4 | +++ python-pydhcplib/pydhcplib/dhcp_basic_packet.py |
---|
[377] | 5 | @@ -99,9 +99,9 @@ |
---|
| 6 | "char":[1,0,1], "16-bits":[2,0,1], |
---|
| 7 | "32-bits":[4,0,1], "identifier":[0,2,1]} |
---|
| 8 | |
---|
| 9 | - specs = fields_specs[DhcpOptionsTypes[DhcpOptions[name]]] |
---|
| 10 | + specs = fields_specs.get(DhcpOptionsTypes[DhcpOptions[name]], []) |
---|
| 11 | length = len(value) |
---|
| 12 | - if (specs[0]!=0 and specs==length) or (specs[1]<=length and length%specs[2]==0): |
---|
| 13 | + if specs == [] or (specs[0]!=0 and specs==length) or (specs[1]<=length and length%specs[2]==0): |
---|
| 14 | self.options_data[name] = value |
---|
| 15 | return True |
---|
| 16 | else : |
---|
Note: See
TracBrowser
for help on using the repository browser.