Skip to content

Commit

Permalink
handle text param not existance in python3.6 subprocess.check_output
Browse files Browse the repository at this point in the history
  • Loading branch information
AHReccese committed Apr 27, 2024
1 parent 99785ed commit 5e17bf4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion reserver/reserver_obj.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
"""Reserver modules."""
from .reserver_func import does_package_exist, generate_template_setup_py
from .util import has_named_parameter
from os import environ, path, getcwd, remove
from shutil import rmtree
from sys import executable
Expand Down Expand Up @@ -93,7 +94,10 @@ def upload(self, package_name):
error = None
for command in commands:
try:
check_output(command, shell=True, text=True)
if has_named_parameter(check_output, "text"):
check_output(command, shell=True, text=True)
else:
check_output(command, shell=True)
except CalledProcessError as e:
publish_failed = True
error = e.output
Expand Down

0 comments on commit 5e17bf4

Please sign in to comment.