Use python3.7 syntax for subprocess.call
Since text= was added in 3.7, let's drop 3.6 from the compat list.
This commit is contained in:
parent
fa659143ad
commit
cd1281d709
2 changed files with 3 additions and 4 deletions
|
@ -56,13 +56,13 @@ def detect_packager():
|
||||||
# If we're detecting packager identity through rpmdev-packager...
|
# If we're detecting packager identity through rpmdev-packager...
|
||||||
rpmdev_packager = shutil.which('rpmdev-packager')
|
rpmdev_packager = shutil.which('rpmdev-packager')
|
||||||
if rpmdev_packager is not None:
|
if rpmdev_packager is not None:
|
||||||
return subprocess.check_output(rpmdev_packager, universal_newlines=True).strip()
|
return subprocess.check_output(rpmdev_packager, text=True).strip()
|
||||||
|
|
||||||
# If we're detecting packager identity through git configuration...
|
# If we're detecting packager identity through git configuration...
|
||||||
git = shutil.which('git')
|
git = shutil.which('git')
|
||||||
if git is not None:
|
if git is not None:
|
||||||
name = subprocess.check_output([git, 'config', 'user.name'], universal_newlines=True).strip()
|
name = subprocess.check_output([git, 'config', 'user.name'], text=True).strip()
|
||||||
email = subprocess.check_output([git, 'config', 'user.email'], universal_newlines=True).strip()
|
email = subprocess.check_output([git, 'config', 'user.email'], text=True).strip()
|
||||||
return f'{name} <{email}>'
|
return f'{name} <{email}>'
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
1
setup.py
1
setup.py
|
@ -49,7 +49,6 @@ ARGS = dict(
|
||||||
"License :: OSI Approved :: MIT License",
|
"License :: OSI Approved :: MIT License",
|
||||||
"Operating System :: POSIX :: Linux",
|
"Operating System :: POSIX :: Linux",
|
||||||
"Programming Language :: Python :: 3 :: Only",
|
"Programming Language :: Python :: 3 :: Only",
|
||||||
"Programming Language :: Python :: 3.6",
|
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
|
|
Loading…
Reference in a new issue