Skip to content

Commit

Permalink
fix more pylint warnings
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@21756 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 20, 2019
1 parent 947ad3b commit d6be5e9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,12 +696,13 @@ def add_tokens(s, extra="extra_link_args", extra_map={"-W" : "extra_compile_args
options = package_options #got given a list of options
for option in options:
cmd = ["pkg-config", "--exists", option]
r, _, _ = get_status_output(cmd)
r = get_status_output(cmd)[0]
if r==0:
valid_option = option
break
if not valid_option:
raise Exception("ERROR: cannot find a valid pkg-config entry for %s using PKG_CONFIG_PATH=%s" % (" or ".join(options), os.environ.get("PKG_CONFIG_PATH", "(empty)")))
raise Exception("ERROR: cannot find a valid pkg-config entry for %s using PKG_CONFIG_PATH=%s" %
(" or ".join(options), os.environ.get("PKG_CONFIG_PATH", "(empty)")))
package_names.append(valid_option)
if verbose_ENABLED and list(pkgs_options)!=list(package_names):
print("exec_pkgconfig(%s,%s) using package names=%s" % (pkgs_options, ekw, package_names))
Expand Down Expand Up @@ -946,6 +947,7 @@ def convert_templates(subdirs):
def clean():
#clean and sdist don't actually use cython,
#so skip this (and avoid errors)
global pkgconfig
pkgconfig = no_pkgconfig
#always include everything in this case:
add_packages("xpra")
Expand Down Expand Up @@ -1699,7 +1701,7 @@ def copytodir(src, dst_dir, dst_name=None, chmod=0o644):
#don't use py_modules or scripts with py2app, and no cython:
del setup_options["py_modules"]
scripts = []
def cython_add(*args, **kwargs):
def cython_add(*_args, **_kwargs):
pass

remove_packages("ctypes.wintypes", "colorsys")
Expand Down Expand Up @@ -2139,7 +2141,7 @@ def which(cmd):
def get_nvcc_version(command):
if not os.path.exists(command):
return None
code, out, err = get_status_output([command, "--version"])
code, out, _ = get_status_output([command, "--version"])
if code!=0:
return None
vpos = out.rfind(", V")
Expand Down

0 comments on commit d6be5e9

Please sign in to comment.