debian/patches/SyntaxWarning.patch
raw| 1 | --- a/src/httpcode/__init__.py |
| 2 | +++ b/src/httpcode/__init__.py |
| 3 | @@ -168,7 +168,7 @@ |
| 4 | Special case, use 'x' for any digit |
| 5 | $ hc 1xx |
| 6 | """ |
| 7 | - _has_code_match = re.compile(code.replace('x', '\d') + '$').match |
| 8 | + _has_code_match = re.compile(code.replace('x', r'\d') + '$').match |
| 9 | found_codes = [c for c in STATUS_CODES if _has_code_match(str(c))] |
| 10 | if not found_codes: |
| 11 | _exit('No code found corresponding to: %s\n' % code) |