[TIC-CORE] support recommends tag
[archive/20170607/tools/tic-core.git] / tic / server / tic_server.py
index 498b4ca..54881e4 100644 (file)
@@ -8,6 +8,7 @@ import os
 import logging
 from tic import command
 from tic.utils import error
+from tic.config import configmgr
 
 app = Flask(__name__)
 
@@ -32,9 +33,9 @@ def analysis():
     except ValueError as ve:
         logger.error(ve)
         resp = makeresponse(str(ve), ve)
-    except Exception as ex:
-        logger.error(ex)
-        resp = makeresponse(str(ex), ex)
+    except Exception as ex:
+        logger.error(ex)
+        resp = makeresponse(str(ex), ex)
     
     return resp
 
@@ -67,6 +68,8 @@ def start(port_num=8082):
         print(url_for('index'))
         print(url_for('analysis'))
         print(url_for('exports'))
+    if isinstance(port_num, (str, unicode)):
+        port_num = int(port_num)
     app.run(host='0.0.0.0', threaded=True, port=port_num)