diff options
author | Thomas Duval <thomas.duval@orange.com> | 2017-12-08 10:40:57 +0100 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2017-12-08 10:40:57 +0100 |
commit | 90587e76709e27c4131a1b9b3668fe4342b09014 (patch) | |
tree | bf0819503b6e1dd639ea834eed7a5086d2660857 /moonv4/moon_db | |
parent | 3b0c40f11620d90338bbb1bfbfbd111bc3ee4878 (diff) |
Fix a bug in moon_manager_db
Change-Id: Ib65a89dba04bc4c94913ee8573401fbb0a6f5c7b
Diffstat (limited to 'moonv4/moon_db')
-rw-r--r-- | moonv4/moon_db/Changelog | 10 | ||||
-rw-r--r-- | moonv4/moon_db/moon_db/__init__.py | 2 | ||||
-rw-r--r-- | moonv4/moon_db/moon_db/db_manager.py | 15 |
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() |