mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-29 10:43:57 +01:00
Compare commits
3 commits
4236017ef8
...
8b11b75c11
Author | SHA1 | Date | |
---|---|---|---|
8b11b75c11 | |||
f87be092a5 | |||
c5ad22c45b |
|
@ -65,7 +65,7 @@ class KeyManager:
|
|||
for filename in await aiofiles.os.listdir(os.path.join('api', 'secret')):
|
||||
if filename.endswith('.txt'):
|
||||
async with aiofiles.open(os.path.join('api', 'secret', 'filename')) as f:
|
||||
async for line in f:
|
||||
for line in await f.readlines():
|
||||
if not line.strip():
|
||||
continue
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ except ImportError:
|
|||
|
||||
load_dotenv()
|
||||
|
||||
with open(os.path.join(helpers.root, 'api', 'config', 'config.yml'), encoding='utf8') as f:
|
||||
with open(os.path.join(helpers.root, 'api', 'config', 'config.yml', encoding='utf8')) as f:
|
||||
credits_config = yaml.safe_load(f)
|
||||
|
||||
## MONGODB Setup
|
||||
|
|
|
@ -5,7 +5,9 @@ from rich import print
|
|||
|
||||
def remove_duplicate_keys(file):
|
||||
with open(file, 'r', encoding='utf8') as f:
|
||||
unique_lines = set(f)
|
||||
lines = f.readlines()
|
||||
|
||||
unique_lines = set(lines)
|
||||
|
||||
with open(file, 'w', encoding='utf8') as f:
|
||||
f.writelines(unique_lines)
|
||||
|
|
Loading…
Reference in a new issue