Cleanups in imports.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Sun, 13 Sep 2015 10:14:09 +0000 (12:14 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Sun, 13 Sep 2015 10:14:09 +0000 (12:14 +0200)
app.py

diff --git a/app.py b/app.py
index c389f78..6bd302b 100755 (executable)
--- a/app.py
+++ b/app.py
@@ -8,9 +8,7 @@ from flask.ext.wtf import Form
 from wtforms.fields import BooleanField, FormField, PasswordField, SelectMultipleField, StringField, SubmitField
 from wtforms import widgets
 
-import pOCCI
-import pOCCI.occi
-import pOCCI.pOCCI
+from pOCCI import pOCCI
 
 
 params = {
@@ -62,7 +60,7 @@ def launch():
         sys.stdout = out[0]
         sys.stderr = out[1]
         try:
-            pOCCI.pOCCI.main(opts)
+            pOCCI.main(opts)
         except SystemExit as se:
             if se.args[0] >= 2:
                 error = 'Fatal error.'
@@ -73,9 +71,10 @@ def launch():
 
     form = SubmitForm()
 
-    tests_all = sorted(pOCCI.pOCCI.tests_definitions.keys())
+    tests_all = sorted(pOCCI.tests_definitions.keys())
+    tests_default = sorted(list(set(tests_all)- pOCCI.tests_skipped))
     form.tests.choices = [(t, t) for t in tests_all]
-    form.tests.data = [(t) for t in sorted(list(set(tests_all)- pOCCI.pOCCI.tests_skipped))]
+    form.tests.data = [(t) for t in tests_default]
 
     return render_template('index.html', form = form)