2
0
mirror of https://github.com/lanjelot/patator synced 2024-11-12 01:10:42 +00:00

match more than one code in -x with a regex

This commit is contained in:
lanjelot 2015-07-24 12:36:50 +10:00
parent f6de99e33e
commit 0b2ad0dc5e

View File

@ -2016,7 +2016,7 @@ class Response_Base:
return getattr(self, 'match_'+key)(val) return getattr(self, 'match_'+key)(val)
def match_code(self, val): def match_code(self, val):
return val == str(self.code) return re.match('%s$' % val, str(self.code))
def match_size(self, val): def match_size(self, val):
return match_range(self.size, val) return match_range(self.size, val)