Skip to content

Commit

Permalink
Merge pull request #1666 from gpotter2/W605
Browse files Browse the repository at this point in the history
W605 - invalid escape sequence
  • Loading branch information
p-l- committed Oct 25, 2018
2 parents 884f6b9 + 03b62f5 commit 234badf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions scapy/arch/windows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ def _get_metrics(ipv6=False):
stdout = POWERSHELL_PROCESS.query([query_cmd])
res = {}
_buffer = []
_pattern = re.compile(".*:\s+(\d+)")
_pattern = re.compile(r".*:\s+(\d+)")
for _line in stdout:
if not _line.strip() and len(_buffer) > 0:
if_index = re.search(_pattern, _buffer[3]).group(1)
Expand Down Expand Up @@ -1179,9 +1179,9 @@ def _read_routes6_7():
lifaddr = in6_getifaddr()
if6_metrics = _get_metrics(ipv6=True)
# Define regexes
r_int = [".*:\s+(\d+)"]
r_all = ["(.*)"]
r_ipv6 = [".*:\s+([A-z|0-9|:]+(\/\d+)?)"]
r_int = [r".*:\s+(\d+)"]
r_all = [r"(.*)"]
r_ipv6 = [r".*:\s+([A-z|0-9|:]+(\/\d+)?)"]
# Build regex list for each object
regex_list = r_ipv6 * 2 + r_int + r_all * 3 + r_int + r_all * 3
current_object = []
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ commands = flake8 scapy/

# flake8 configuration
[flake8]
ignore = E731, W504, W605
ignore = E731, W504
exclude = scapy/modules/six.py,
scapy/modules/winpcapy.py

0 comments on commit 234badf

Please sign in to comment.