summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2023-04-01 12:24:59 +0200
committerGitHub <noreply@github.com>2023-04-01 12:24:59 +0200
commit7eadee31db2f038763a3a6f978db1ea76bbc4674 (patch)
tree55d75da147cc3a40b989e18df1126de5167b66cf /setup.py
parent7d55ce4e3d81705264398a15ffaa1896f4e1aefc (diff)
downloadpsutil-7eadee31db2f038763a3a6f978db1ea76bbc4674.tar.gz
Fix pylint warnings / cleanup (#2218)
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 65dad252..4e6f6f17 100755
--- a/setup.py
+++ b/setup.py
@@ -346,10 +346,7 @@ if POSIX:
# for an explanation of Solaris /etc/release
with open('/etc/release') as f:
update = re.search(r'(?<=s10s_u)[0-9]{1,2}', f.readline())
- if update is None:
- return 0
- else:
- return int(update.group(0))
+ return int(update.group(0)) if update else 0
posix_extension.libraries.append('socket')
if platform.release() == '5.10':