diff --git a/service/port.py b/service/port.py index b7bdd95ac..8fc7a70ab 100644 --- a/service/port.py +++ b/service/port.py @@ -478,7 +478,7 @@ class Port(object): firstLine = firstLine.strip() # If XML-style start of tag encountered, detect as XML - if re.match(RE_XML_START, firstLine): + if re.search(RE_XML_START, firstLine): if encoding: return "XML", cls.importXml(string, iportuser, encoding) else: diff --git a/utils/stopwatch.py b/utils/stopwatch.py index 12e1de11b..8b78f21af 100644 --- a/utils/stopwatch.py +++ b/utils/stopwatch.py @@ -68,7 +68,7 @@ m_re_sub(stpwth, 1000, 100000, "asdfadsasdaasdfadsasda") return self.__last * 1000 def __update_stat(self, v): - # :param v: unit of ms + # :param v: float unit of ms if self.min == 0.0: self.min = v if self.max < v: