Commits

Audrius Kažukauskas  committed cc80673

Use context manager to open assets.yaml

  • Participants
  • Parent commits 81efe4e

Comments (0)

Files changed (1)

File beancounter/__init__.py

     # Disable asset rebuilding in production mode.
     if not app.debug:
         assets.auto_build = False
-    assets.from_yaml(app.open_resource('assets.yaml'))
+    with app.open_resource('assets.yaml') as f:
+        assets.from_yaml(f)
 
     return app