From b767df14c91edfa0224ea802ae035f3133bb6708 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Sun, 25 Mar 2018 20:31:25 +0000 Subject: [PATCH] Revert "Wait until got session" This reverts commit fa3d533354fb872904a84b42a31173193a3688c9. --- discordbot/titanembeds/database/__init__.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/discordbot/titanembeds/database/__init__.py b/discordbot/titanembeds/database/__init__.py index 9f5f2e1..e2f3f6c 100644 --- a/discordbot/titanembeds/database/__init__.py +++ b/discordbot/titanembeds/database/__init__.py @@ -33,13 +33,7 @@ class DatabaseInterface(object): @contextmanager def get_session(self) -> Session: - got_session = False - while not got_session: - try: - session = self._sessionmaker() # type: Session - got_session = True - except: - pass + session = self._sessionmaker() # type: Session try: yield session session.commit()