Skip to content

Commit 2edcb01

Browse files
committed
fix config error
1 parent 6ac181b commit 2edcb01

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

py_config.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22

33
class Config:
44
def __init__(self):
5+
current_dir = os.path.dirname(os.path.abspath(__file__))
6+
src_dir = os.path.join(current_dir, "src")
7+
58
directories = [
6-
'./src',
7-
'./src/utils',
8-
'./src/decryption',
9+
src_dir,
10+
os.path.join(src_dir, "utils"),
11+
os.path.join(src_dir, "decryption"),
912
]
13+
1014
for directory in directories:
1115
os.makedirs(directory, exist_ok=True)
1216
init_file = os.path.join(directory, '__init__.py')
1317
if not os.path.exists(init_file):
1418
with open(init_file, 'w') as f:
1519
f.write('# Package initialization\n')
16-
print(f"Created: {init_file}")
17-
else: print(f"Already exists: {init_file}")
20+
21+
if __name__ == "__main__":
22+
Config()

0 commit comments

Comments
 (0)