aboutsummaryrefslogtreecommitdiffstats
path: root/TLV_utils.py
diff options
context:
space:
mode:
authorhploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b>2007-06-09 19:31:05 +0000
committerhploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b>2007-06-09 19:31:05 +0000
commit9a1a0ccdce00451f505f0ac1ca5b51f59d4f21d3 (patch)
tree917dad6e231c7874bd28fede91352feffd5b12bf /TLV_utils.py
parentfd7bcf04a194efce6301df2f7ca27d18863448d2 (diff)
sre is deprecated in python 2.5
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@238 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'TLV_utils.py')
-rw-r--r--TLV_utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/TLV_utils.py b/TLV_utils.py
index 48263b7..80979e3 100644
--- a/TLV_utils.py
+++ b/TLV_utils.py
@@ -1,4 +1,4 @@
-import binascii, utils, sre, sys
+import binascii, utils, re, sys
class identifier:
"""An identifier, because I'm too lazy to use quotes all over the place.
@@ -174,7 +174,7 @@ def decode_oid(value):
loadOids()
return " %s (%s)" % (str_rep, oidCache.get(str_rep, ("No description available",))[0])
-_gtimere = sre.compile(r'(\d{4})(\d\d)(\d\d)(\d\d)(?:(\d\d)(\d\d(?:[.,]\d+)?)?)?(|Z|(?:[+-]\d\d(?:\d\d)?))$')
+_gtimere = re.compile(r'(\d{4})(\d\d)(\d\d)(\d\d)(?:(\d\d)(\d\d(?:[.,]\d+)?)?)?(|Z|(?:[+-]\d\d(?:\d\d)?))$')
def decode_generalized_time(value):
matches = _gtimere.match(value)
if not matches:
@@ -201,7 +201,7 @@ def decode_generalized_time(value):
return "".join(result)
-_utimere = sre.compile(r'(\d\d)(\d\d)(\d\d)(\d\d)(?:(\d\d))?(Z|(?:[+-]\d\d(?:\d\d)?))$')
+_utimere = re.compile(r'(\d\d)(\d\d)(\d\d)(\d\d)(?:(\d\d))?(Z|(?:[+-]\d\d(?:\d\d)?))$')
def decode_utc_time(value):
matches = _utimere.match(value)
if not matches: