Commits

Audrius Kažukauskas committed cc80673

Use context manager to open assets.yaml

Comments (0)

Files changed (1)

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