From: František Dvořák Date: Sun, 13 Sep 2015 10:14:09 +0000 (+0200) Subject: Cleanups in imports. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=800a2ef56b3a61f8840569c8e7b413f988acf071;p=pOCCI-flask.git Cleanups in imports. --- diff --git a/app.py b/app.py index c389f78..6bd302b 100755 --- 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)