Skip to content

Commit

Permalink
Fix DeprecationWarning: invalid escape sequence (#1318)
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG authored and giampaolo committed Aug 8, 2018
1 parent 892e70a commit 0352a00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions psutil/_psaix.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def net_if_stats():
stdout, stderr = [x.decode(sys.stdout.encoding)
for x in (stdout, stderr)]
if p.returncode == 0:
re_result = re.search("Running: (\d+) Mbps.*?(\w+) Duplex", stdout)
re_result = re.search(r"Running: (\d+) Mbps.*?(\w+) Duplex", stdout)
if re_result is not None:
speed = int(re_result.group(1))
duplex = re_result.group(2)
Expand Down Expand Up @@ -534,7 +534,7 @@ def open_files(self):
for x in (stdout, stderr)]
if "no such process" in stderr.lower():
raise NoSuchProcess(self.pid, self._name)
procfiles = re.findall("(\d+): S_IFREG.*\s*.*name:(.*)\n", stdout)
procfiles = re.findall(r"(\d+): S_IFREG.*\s*.*name:(.*)\n", stdout)
retlist = []
for fd, path in procfiles:
path = path.strip()
Expand Down

0 comments on commit 0352a00

Please sign in to comment.