]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
removed redundant found_table, making self.has_table usage more compact while throwin...
authorSumit Khanna <ksumeet40@gmail.com>
Fri, 1 Oct 2021 05:34:16 +0000 (11:04 +0530)
committerSumit Khanna <ksumeet40@gmail.com>
Fri, 1 Oct 2021 05:34:16 +0000 (11:04 +0530)
lib/sqlalchemy/engine/reflection.py

index 3ccec8eb9bb9061f44522dc2b1ff018efe0fa968..4c6c6d93962f5c800d868f4128fb4abc1be51c39 100644 (file)
@@ -768,7 +768,6 @@ class Inspector(object):
             if isinstance(table_name, str):
                 table_name = table_name.decode(dialect.encoding)
 
-        found_table = True if self.has_table(table.name) else False
         cols_by_orig_name = {}
 
         for col_d in self.get_columns(
@@ -782,7 +781,7 @@ class Inspector(object):
                 cols_by_orig_name,
             )
 
-        if not found_table:
+        if not self.has_table(table.name):
             raise exc.NoSuchTableError(table.name)
 
         self._reflect_pk(