Permalink
Browse files

Update flask_peewee/db.py

don't pop the config entries, maybe I want to read this information from my app again
  • Loading branch information...
1 parent 1487bbf commit 555a9de2de01df7080742c87cec56a8e9ca42666 @dedan dedan committed Dec 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 flask_peewee/db.py
View
@@ -17,8 +17,8 @@ def __init__(self, app):
def load_database(self):
self.database_config = self.app.config['DATABASE']
try:
- self.database_name = self.database_config.pop('name')
- self.database_engine = self.database_config.pop('engine')
+ self.database_name = self.database_config.get('name')
+ self.database_engine = self.database_config.get('engine')
except KeyError:
raise ImproperlyConfigured('Please specify a "name" and "engine" for your database')

0 comments on commit 555a9de

Please sign in to comment.