Skip to content

Commit

Permalink
fix deprecation warnings in regexes
Browse files Browse the repository at this point in the history
  • Loading branch information
SomberNight committed Sep 20, 2018
1 parent e4fd5ec commit 55b5825
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions electrum/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ def parse_servers(result):
pruning_level = '-'
if len(item) > 2:
for v in item[2]:
if re.match("[st]\d*", v):
if re.match(r"[st]\d*", v):
protocol, port = v[0], v[1:]
if port == '': port = constants.net.DEFAULT_PORTS[protocol]
out[protocol] = port
elif re.match("v(.?)+", v):
version = v[1:]
elif re.match("p\d*", v):
elif re.match(r"p\d*", v):
pruning_level = v[1:]
if pruning_level == '': pruning_level = '0'
if out:
Expand Down
2 changes: 1 addition & 1 deletion electrum/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def multisig_type(wallet_type):
otherwise return None.'''
if not wallet_type:
return None
match = re.match('(\d+)of(\d+)', wallet_type)
match = re.match(r'(\d+)of(\d+)', wallet_type)
if match:
match = [int(x) for x in match.group(1, 2)]
return match
Expand Down

0 comments on commit 55b5825

Please sign in to comment.