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

of using re instead of regex.
This commit is contained in:
Fred Drake 1998-04-27 14:39:44 +00:00
parent 8c8e814992
commit 9291d271fb
1 changed files with 1 additions and 2 deletions

View File

@ -486,8 +486,7 @@ def parse150(resp):
global _150_re
if _150_re is None:
import re
_150_re = re.compile("150 .* \(([0-9][0-9]*) bytes\)",
re.IGNORECASE)
_150_re = re.compile("150 .* \((\d+) bytes\)", re.IGNORECASE)
m = _150_re.match(resp)
if m:
return string.atoi(m.group(1))