From 99a1c9942279abc9b7bf56cfd74efe2dcb4e2a0b Mon Sep 17 00:00:00 2001 From: KatKatKateryna Date: Tue, 5 Dec 2023 00:20:29 +0800 Subject: [PATCH] get stream via client; fix branch name from url formatting; remove shell keyword from subprocess --- qt_ui/widget_add_stream.py | 2 +- qt_ui/widget_dependencies_upgrade.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/qt_ui/widget_add_stream.py b/qt_ui/widget_add_stream.py index 12c1e83..3ea1e6f 100644 --- a/qt_ui/widget_add_stream.py +++ b/qt_ui/widget_add_stream.py @@ -131,7 +131,7 @@ class AddStreamModalDialog(QtWidgets.QWidget, FORM_CLASS): branch_name = sw.branch_name for br in stream.branches.items: name = urllib.parse.quote(br.name) - if name == branch_name: + if br.name == branch_name: branch = br break if sw.type == "commit": diff --git a/qt_ui/widget_dependencies_upgrade.py b/qt_ui/widget_dependencies_upgrade.py index 3b488a2..2b7d895 100644 --- a/qt_ui/widget_dependencies_upgrade.py +++ b/qt_ui/widget_dependencies_upgrade.py @@ -91,23 +91,17 @@ To do it manually, you can run 2 following commands from QGIS Plugins panel->Pyt result1 = subprocess.run( [path(), "-m", "pip", "install", "requests==2.31.0"], - shell=True, timeout=1000, capture_output=True, - text=True, ) result2 = subprocess.run( [path(), "-m", "pip", "install", "urllib3==1.26.16"], - shell=True, timeout=1000, capture_output=True, - text=True, ) result3 = subprocess.run( [path(), "-m", "pip", "install", "requests_toolbelt==0.10.1"], - shell=True, timeout=1000, capture_output=True, - text=True, ) return result1, result2, result3