Added
Link Here
|
1 |
--- validate.py.orig 2010-03-01 23:04:02 UTC |
2 |
+++ validate.py |
3 |
@@ -284,7 +284,7 @@ |
4 |
except socket.error: |
5 |
# bug in inet_aton, corrected in Python 2.4 |
6 |
if ip.strip() == '255.255.255.255': |
7 |
- return 0xFFFFFFFFL |
8 |
+ return 0xFFFFFFFF |
9 |
else: |
10 |
raise ValueError('Not a good dotted-quad IP: %s' % ip) |
11 |
return |
12 |
@@ -316,7 +316,7 @@ |
13 |
import socket, struct |
14 |
|
15 |
# no need to intercept here, 4294967295L is fine |
16 |
- if num > 4294967295L or num < 0: |
17 |
+ if num > 4294967295 or num < 0: |
18 |
raise ValueError('Not a good numeric IP: %s' % num) |
19 |
try: |
20 |
return socket.inet_ntoa( |
21 |
@@ -739,7 +739,7 @@ |
22 |
elif isinstance(val, (int, long, float, basestring)): |
23 |
try: |
24 |
out_params.append(fun(val)) |
25 |
- except ValueError, e: |
26 |
+ except ValueError as e: |
27 |
raise VdtParamError(name, val) |
28 |
else: |
29 |
raise VdtParamError(name, val) |
30 |
@@ -1292,7 +1292,7 @@ |
31 |
raise VdtValueTooLongError(value) |
32 |
try: |
33 |
return [fun_dict[arg](val) for arg, val in zip(args, value)] |
34 |
- except KeyError, e: |
35 |
+ except KeyError as e: |
36 |
raise VdtParamError('mixed_list', e) |
37 |
|
38 |
|