mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-25 18:13:56 +01:00
Compare commits
3 commits
d66370d6b3
...
15b4aed848
Author | SHA1 | Date | |
---|---|---|---|
15b4aed848 | |||
4236017ef8 | |||
1a858cd47d |
|
@ -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:
|
||||
for line in await f.readlines():
|
||||
async for line in f:
|
||||
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,9 +5,7 @@ from rich import print
|
|||
|
||||
def remove_duplicate_keys(file):
|
||||
with open(file, 'r', encoding='utf8') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
unique_lines = set(lines)
|
||||
unique_lines = set(f)
|
||||
|
||||
with open(file, 'w', encoding='utf8') as f:
|
||||
f.writelines(unique_lines)
|
||||
|
|
Loading…
Reference in a new issue