fix imports and a regex literal
This commit is contained in:
parent
82b3ab7cfd
commit
95925730da
|
|
@ -1,10 +1,13 @@
|
|||
"""
|
||||
This module contains all function used in parsing packets
|
||||
"""
|
||||
import time
|
||||
import re
|
||||
import math
|
||||
import logging
|
||||
from datetime import datetime
|
||||
|
||||
from .exceptions import *
|
||||
from .exceptions import (UnknownFormat, ParseError)
|
||||
|
||||
__all__ = ['parse']
|
||||
|
||||
|
|
@ -438,7 +441,7 @@ def parse(raw_sentence):
|
|||
teqns = [0, 1, 0] * 5
|
||||
|
||||
for idx, val in enumerate(eqns):
|
||||
if not re.match("^([-]?\d*\.?\d+|)$", val):
|
||||
if not re.match(r"^([-]?\d*\.?\d+|)$", val):
|
||||
raise ParseError("value at %d is not a number in %s" % (idx+1, form), raw_sentence)
|
||||
else:
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = '0.6.3'
|
||||
__version__ = '0.6.4'
|
||||
|
|
|
|||
Loading…
Reference in New Issue