Skip to content

Commit

Permalink
Some minor flake8-assisted cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jwiggins committed May 25, 2017
1 parent b43edf2 commit 15f4c3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions rpathology/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@
get_rpaths, set_rpaths)
else:
raise ImportError('This platform({}) is not supported!'.format(__sys_os))


# Keep flake8 happy without telling it to ignore everything
hushup_flake8 = [build_rpath, is_executable, get_missing_libraries, get_rpaths,
set_rpaths]
del hushup_flake8
3 changes: 1 addition & 2 deletions rpathology/elf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from elftools.elf.dynamic import DynamicSection
from elftools.elf.elffile import ELFFile


PY3K = sys.version_info > (3, 0)
MISSING_LIB_REGEX = re.compile(r'.+(not found).+')


def _bytes2str(b):
if PY3K:
return b.decode('utf-8')
Expand Down Expand Up @@ -68,7 +68,6 @@ def is_executable(path):
def get_missing_libraries(path):
""" Return a list of missing libraries for a given executable.
"""
shortpath = op.basename(path)
if not is_executable(path):
return []

Expand Down
2 changes: 1 addition & 1 deletion rpathology/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
import os.path as op

from .api import is_executable, get_missing_libraries
from .api import get_missing_libraries


def _show_misses(misses, root):
Expand Down

0 comments on commit 15f4c3f

Please sign in to comment.