Skip to content

Commit

Permalink
Reorder imports
Browse files Browse the repository at this point in the history
  • Loading branch information
n8henrie committed Mar 13, 2017
1 parent 70abe86 commit f61dac0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions homeassistant/components/recorder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,16 +287,15 @@ def block_till_done(self):

def _setup_connection(self):
"""Ensure database is ready to fly."""
from sqlalchemy import create_engine
from sqlalchemy import create_engine, event
from sqlalchemy.engine import Engine
from sqlalchemy.orm import scoped_session
from sqlalchemy.orm import sessionmaker

from . import models

kwargs = {}

from sqlalchemy.engine import Engine
from sqlalchemy import event

@event.listens_for(Engine, "connect")
def set_sqlite_pragma(dbapi_connection, connection_record):
if self.db_url.startswith("sqlite://"):
Expand Down

0 comments on commit f61dac0

Please sign in to comment.