We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac26300 commit 66792e0Copy full SHA for 66792e0
2 files changed
scriptshifter/tables/__init__.py
@@ -64,8 +64,7 @@
64
65
logger = logging.getLogger(__name__)
66
67
-with open(path.join(path.dirname(TABLE_DIR), "index.yml")) as fh:
68
- tbl_index = load(fh, Loader=Loader)
+tbl_index = None # Module-level index of all scripts.
69
70
71
class Token(str):
@@ -166,6 +165,9 @@ def init_db():
166
165
conn.executescript(fh.read())
167
168
# Populate tables.
+ global tbl_index
169
+ with open(path.join(path.dirname(TABLE_DIR), "index.yml")) as fh:
170
+ tbl_index = load(fh, Loader=Loader)
171
try:
172
with conn:
173
for tname, tdata in tbl_index.items():
0 commit comments