403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/games/anki/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/games/anki/files/patch-python_pyqt_install.py
Only import PIP if it's available otherwise continue as usual.

--- python/pyqt/install.py.orig	2022-06-26 10:33:56 UTC
+++ python/pyqt/install.py
@@ -6,7 +6,11 @@ import sys
 import subprocess
 import sys
 
-from pip._internal.commands import create_command
+try:
+    from pip._internal.commands import create_command
+    is_pip_available = True
+except:
+    is_pip_available = False
 
 
 def install_packages(requirements_path, directory, pip_args):
@@ -21,8 +25,10 @@ def install_packages(requirements_path, directory, pip
         "-r",
         requirements_path
     ] + pip_args
-    cmd = create_command("install")
-    assert not cmd.main(pip_args)
+
+    if is_pip_available:
+        cmd = create_command("install")
+        assert not cmd.main(pip_args)
 
 
 def main():

Youez - 2016 - github.com/yon3zu
LinuXploit