1. codernity
  2. CodernityDB-HTTP


codernity  committed 89c2ccb

Fixed return value of autosave method.

  • Participants
  • Parent commits 6b5064f
  • Branches default

Comments (0)

Files changed (1)

File CodernityDBHTTP/misc.py

View file
 def open_with_autosave(db, cfg_path, cfg):
     def _inner(*args, **kwargs):
-        db.open(*args, **kwargs)
+        res = db.open(*args, **kwargs)
         if cfg.get('auto_save') and cfg.get('db_path') != db.path:
             cfg['db_path'] = db.path
             with open(cfg_path, 'w') as f:
                 f.write(json.dumps(cfg, sort_keys=True, indent=4))
+        return res
     return _inner