From 5e17bf41424ae37ea5cc6a320dd907283643ab7c Mon Sep 17 00:00:00 2001 From: AHReccese Date: Sun, 28 Apr 2024 03:00:04 +0330 Subject: [PATCH] handle `text` param not existance in python3.6 `subprocess.check_output` --- reserver/reserver_obj.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reserver/reserver_obj.py b/reserver/reserver_obj.py index d23a065..a8237f6 100644 --- a/reserver/reserver_obj.py +++ b/reserver/reserver_obj.py @@ -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 @@ -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