We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddc8fec commit ac26300Copy full SHA for ac26300
2 files changed
scriptshifter/tables/__init__.py
@@ -64,7 +64,8 @@
64
65
logger = logging.getLogger(__name__)
66
67
-tbl_index = None # Module-level index of all scripts.
+with open(path.join(path.dirname(TABLE_DIR), "index.yml")) as fh:
68
+ tbl_index = load(fh, Loader=Loader)
69
70
71
class Token(str):
@@ -165,9 +166,6 @@ def init_db():
165
166
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