Skip to content

Commit

Permalink
Use futurize to fix has_key
Browse files Browse the repository at this point in the history
  • Loading branch information
persianpros authored and Huevos committed Apr 17, 2021
1 parent ffe71fc commit 10b0a41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def getIfConfig(ifname):
def getIfInfo():
for port in ('eth0', 'eth1', 'wlan0', 'wlan1', 'wlan2', 'wlan3', 'ra0'):
ifinfo = getIfConfig(port)
if ifinfo.has_key('addr'):
if 'addr' in ifinfo:
return ifinfo
return None

Expand Down
2 changes: 1 addition & 1 deletion pygettext.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def containsAny(str, set):
def _visit_pyfiles(list, dirname, names):
"""Helper for getFilesForName()."""
# get extension for python source files
if not globals().has_key('_py_ext'):
if '_py_ext' not in globals():
global _py_ext
_py_ext = [triple[0] for triple in imp.get_suffixes()
if triple[2] == imp.PY_SOURCE][0]
Expand Down

0 comments on commit 10b0a41

Please sign in to comment.