Commit 0b6c4f514225eb9a32dedd10ba18d184c735e860

Authored by Erickson Silva
1 parent f7764568
Exists in devel

[TranslationServer] Arruma import MySQL

Showing 1 changed file with 4 additions and 1 deletions   Show diff stats
src/TranslationServer.py
... ... @@ -10,6 +10,7 @@ from threading import Lock
10 10 from logging.handlers import RotatingFileHandler
11 11 import os, argparse, thread, logging, sys
12 12  
  13 +MySQLdb=None
13 14 RUN_MODE=None
14 15 BUNDLES_PATH=None
15 16 conn=None
... ... @@ -38,7 +39,9 @@ def dict_mode():
38 39 BUNDLES_PATH={"IOS":IOS_SIGNS_PATH, "ANDROID":ANDROID_SIGNS_PATH, "STANDALONE":STANDALONE_SIGNS_PATH, "WEBGL":WEBGL_SIGNS_PATH}
39 40  
40 41 def connect_database():
41   - import MySQLdb, warnings
  42 + import MySQLdb as mysql
  43 + import warnings
  44 + MySQLdb = mysql
42 45 global conn
43 46 warnings.filterwarnings('ignore', category=MySQLdb.Warning)
44 47 while True:
... ...