aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2022-08-19 21:24:55 +0300
committerBonfaceKilz2022-08-23 13:34:14 +0300
commit7e11e57ee4f9fc1dc3c967c9b2d26038a7727f72 (patch)
tree788c8eb75e27f8c614dc433531372a0c4ae09c74
parente15d5649b3a98aa39b0d8c095f4f9a44c99e4acd (diff)
downloadgenenetwork2-7e11e57ee4f9fc1dc3c967c9b2d26038a7727f72.tar.gz
Delete unused function and imports.
* wqflask/wqflask/database.py: Remove unused sqlalchemy imports. (read_from_pyfile): Delete it.
-rw-r--r--wqflask/wqflask/database.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/wqflask/wqflask/database.py b/wqflask/wqflask/database.py
index f0ce0a77..d8cc5de9 100644
--- a/wqflask/wqflask/database.py
+++ b/wqflask/wqflask/database.py
@@ -8,16 +8,6 @@ import importlib
import MySQLdb
-from sqlalchemy import create_engine
-from sqlalchemy.orm import scoped_session, sessionmaker
-from sqlalchemy.ext.declarative import declarative_base
-
-def read_from_pyfile(pyfile, setting):
- orig_sys_path = sys.path[:]
- sys.path.insert(0, os.path.dirname(pyfile))
- module = importlib.import_module(os.path.basename(pyfile).strip(".py"))
- sys.path = orig_sys_path[:]
- return module.__dict__.get(setting)
def sql_uri():
"""Read the SQL_URI from the environment or settings file."""