diff --git a/plugins/php-apt/index_php_apt.py b/plugins/php-apt/index_php_apt.py index 97ade4c7d..0be394d49 100755 --- a/plugins/php-apt/index_php_apt.py +++ b/plugins/php-apt/index_php_apt.py @@ -11,8 +11,11 @@ import shutil # reload(sys) # sys.setdefaultencoding('utf8') -sys.path.append(os.getcwd() + "/class/core") -import mw +try: + sys.path.append(os.getcwd() + "/class/core") + import mw +except Exception as e: + import core.mw as mw if mw.isAppleSystem(): cmd = 'ls /usr/local/lib/ | grep python | cut -d \\ -f 1 | awk \'END {print}\'' diff --git a/plugins/php-yum/index_php_yum.py b/plugins/php-yum/index_php_yum.py index 0600580d6..5a421e423 100755 --- a/plugins/php-yum/index_php_yum.py +++ b/plugins/php-yum/index_php_yum.py @@ -11,8 +11,11 @@ import shutil # reload(sys) # sys.setdefaultencoding('utf8') -sys.path.append(os.getcwd() + "/class/core") -import mw +try: + sys.path.append(os.getcwd() + "/class/core") + import mw +except Exception as e: + import core.mw as mw if mw.isAppleSystem(): cmd = 'ls /usr/local/lib/ | grep python | cut -d \\ -f 1 | awk \'END {print}\'' diff --git a/plugins/php/index_php.py b/plugins/php/index_php.py index 5ffba3af6..bfd9bca31 100755 --- a/plugins/php/index_php.py +++ b/plugins/php/index_php.py @@ -10,9 +10,11 @@ import shutil # reload(sys) # sys.setdefaultencoding('utf8') - -sys.path.append(os.getcwd() + "/class/core") -import mw +try: + sys.path.append(os.getcwd() + "/class/core") + import mw +except Exception as e: + import core.mw as mw if mw.isAppleSystem(): cmd = 'ls /usr/local/lib/ | grep python | cut -d \\ -f 1 | awk \'END {print}\''