aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4
diff options
context:
space:
mode:
Diffstat (limited to 'moonv4')
-rw-r--r--moonv4/moon_db/Changelog10
-rw-r--r--moonv4/moon_db/moon_db/__init__.py2
-rw-r--r--moonv4/moon_db/moon_db/db_manager.py15
3 files changed, 18 insertions, 9 deletions
diff --git a/moonv4/moon_db/Changelog b/moonv4/moon_db/Changelog
index c1e8a770..6f5619d1 100644
--- a/moonv4/moon_db/Changelog
+++ b/moonv4/moon_db/Changelog
@@ -35,4 +35,12 @@ CHANGES
1.2.0
-----
-- Update the db_manager in order to use it for tests \ No newline at end of file
+- Update the db_manager in order to use it for tests
+
+1.2.1
+-----
+- Update moon_db_manager in order to use it for unit tests
+
+1.2.2
+-----
+- Fix a bug in moon_db_manager
diff --git a/moonv4/moon_db/moon_db/__init__.py b/moonv4/moon_db/moon_db/__init__.py
index 515227fa..6aead152 100644
--- a/moonv4/moon_db/moon_db/__init__.py
+++ b/moonv4/moon_db/moon_db/__init__.py
@@ -3,5 +3,5 @@
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "1.2.1"
+__version__ = "1.2.2"
diff --git a/moonv4/moon_db/moon_db/db_manager.py b/moonv4/moon_db/moon_db/db_manager.py
index 88d5b7d3..75cbcdb0 100644
--- a/moonv4/moon_db/moon_db/db_manager.py
+++ b/moonv4/moon_db/moon_db/db_manager.py
@@ -52,11 +52,7 @@ def init_engine():
return create_engine(db_conf['url'])
-# def format_data(ext):
-# return ext.name, ext.obj.upgrade()
-
-
-def run(command, logger, engine):
+def main(command, logger, engine):
files = glob.glob(versions.__path__[0] + "/[0-9][0-9][0-9]*.py")
for filename in files:
filename = os.path.basename(filename).replace(".py", "")
@@ -75,7 +71,12 @@ def run(command, logger, engine):
else:
logger.critical("Cannot understand the command!")
-if __name__ == "__main__":
+
+def run():
args, logger = init_args()
engine = init_engine()
- run(args.command[0], logger, engine)
+ main(args.command[0], logger, engine)
+
+
+if __name__ == "__main__":
+ run()