Commit 9291d271 authored by Fred Drake's avatar Fred Drake

parse150(): Simplify RE used to parse the message a little, taking advantage

	of using re instead of regex.
parent 8c8e8149
...@@ -486,8 +486,7 @@ def parse150(resp): ...@@ -486,8 +486,7 @@ def parse150(resp):
global _150_re global _150_re
if _150_re is None: if _150_re is None:
import re import re
_150_re = re.compile("150 .* \(([0-9][0-9]*) bytes\)", _150_re = re.compile("150 .* \((\d+) bytes\)", re.IGNORECASE)
re.IGNORECASE)
m = _150_re.match(resp) m = _150_re.match(resp)
if m: if m:
return string.atoi(m.group(1)) return string.atoi(m.group(1))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment