From 0b2ad0dc5e590456043a6cc5f57ae27711edcd87 Mon Sep 17 00:00:00 2001 From: lanjelot Date: Fri, 24 Jul 2015 12:36:50 +1000 Subject: [PATCH] match more than one code in -x with a regex --- patator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patator.py b/patator.py index 07e8596..8974e11 100755 --- a/patator.py +++ b/patator.py @@ -2016,7 +2016,7 @@ class Response_Base: return getattr(self, 'match_'+key)(val) def match_code(self, val): - return val == str(self.code) + return re.match('%s$' % val, str(self.code)) def match_size(self, val): return match_range(self.size, val)