summaryrefslogtreecommitdiffstats
path: root/systemCheck.py
diff options
context:
space:
mode:
Diffstat (limited to 'systemCheck.py')
-rw-r--r--systemCheck.py72
1 files changed, 25 insertions, 47 deletions
diff --git a/systemCheck.py b/systemCheck.py
index 60fe0313b..bc9605a8a 100644
--- a/systemCheck.py
+++ b/systemCheck.py
@@ -4,44 +4,36 @@ import sys
#from module import InitHomeDir
-#very ugly prints, but at least it works with python 3
-
def main():
print("##### System Information #####\n")
- print("Platform:", sys.platform)
- print("Operating System:", os.name)
- print("Python:", sys.version.replace("\n", "")+ "\n")
+ print("Platform: " + sys.platform)
+ print("Operating System: " + os.name)
+ print("Python: " + sys.version.replace("\n", "")+ "\n")
try:
import pycurl
- print("pycurl:", pycurl.version)
+ print("pycurl: " + pycurl.version)
except:
- print("pycurl:", "missing")
+ print("pycurl: missing")
try:
import Crypto
- print("py-crypto:", Crypto.__version__)
+ print("py-crypto: " + Crypto.__version__)
except:
- print("py-crypto:", "missing")
+ print("py-crypto: missing")
try:
import OpenSSL
- print("OpenSSL:", OpenSSL.version.__version__)
+ print("OpenSSL: " + OpenSSL.version.__version__)
except:
- print("OpenSSL:", "missing")
+ print("OpenSSL: missing")
try:
import Image
- print("image libary:", Image.VERSION)
+ print("image library: " + Image.VERSION)
except:
- print("image libary:", "missing")
-
- try:
- import PyQt4.QtCore
- print("pyqt:", PyQt4.QtCore.PYQT_VERSION_STR)
- except:
- print("pyqt:", "missing")
+ print("image library: missing")
print("\n\n##### System Status #####")
print("\n## pyLoadCore ##")
@@ -50,10 +42,10 @@ def main():
core_info = []
if sys.version_info > (2, 8):
- core_err.append("Your python version is to new, Please use Python 2.6/2.7")
+ core_err.append("Your python version is too new, Please use Python 2.6/2.7")
if sys.version_info < (2, 5):
- core_err.append("Your python version is to old, Please use at least Python 2.5")
+ core_err.append("Your python version is too old, Please use at least Python 2.5")
try:
import pycurl
@@ -64,18 +56,18 @@ def main():
try:
from pycurl import AUTOREFERER
except:
- core_err.append("Your py-curl version is to old, please upgrade!")
+ core_err.append("Your py-curl version is too old, please upgrade!")
try:
import Image
except:
- core_err.append("Please install py-imaging/pil to use Hoster, which uses captchas.")
+ core_err.append("Please install py-imaging/pil to use Hoster, which use captchas.")
pipe = subprocess.PIPE
try:
p = subprocess.call(["tesseract"], stdout=pipe, stderr=pipe)
except:
- core_err.append("Please install tesseract to use Hoster, which uses captchas.")
+ core_info.append("Install tesseract to try automatic captcha resolution.")
try:
import OpenSSL
@@ -94,24 +86,6 @@ def main():
for line in core_info:
print(line)
-
- print("\n## pyLoadGui ##")
-
- gui_err = []
-
- try:
- import PyQt4
- except:
- gui_err.append("GUI won't work without pyqt4 !!")
-
- if gui_err:
- print("The system check has detected some errors:\n")
- for err in gui_err:
- print(err)
- else:
- print("No Problems detected, pyLoadGui should work fine.")
-
-
print("\n## Webinterface ##")
web_err = []
@@ -120,7 +94,7 @@ def main():
try:
import flup
except:
- web_info.append("Install Flup to use FastCGI or optional webservers.")
+ web_info.append("Install Flup to use FastCGI or optional web servers.")
if web_err:
@@ -128,15 +102,19 @@ def main():
for err in web_err:
print(err)
else:
- print("No Problems detected, Webinterface should work fine.")
+ print("No Problems detected, web interface should work fine.")
if web_info:
- print("\nPossible improvements for webinterface:\n")
+ print("\nPossible improvements for web interface:\n")
for line in web_info:
print(line)
-
+
if __name__ == "__main__":
main()
- raw_input("Press Enter to Exit.")
+ # comp. with py2 and 3
+ try:
+ input("Press Enter to Exit.")
+ except SyntaxError: # will raise in py2
+ pass