Fix require_login
This commit is contained in:
parent
5d955608f6
commit
b098ab1d5c
1 changed files with 1 additions and 2 deletions
3
util.py
3
util.py
|
@ -1,4 +1,3 @@
|
|||
import commands.login
|
||||
import shutil
|
||||
import textwrap
|
||||
from typing import Any, Callable
|
||||
|
@ -27,7 +26,7 @@ def print_wrap(text: str, indent: str = '', end: str = '\n') -> None:
|
|||
def require_login(function: Callable) -> Callable:
|
||||
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
||||
while 'api_token' not in Config['user']:
|
||||
commands.login.login(None)
|
||||
print('Not logged in. Please use the login command to log in.')
|
||||
|
||||
return function(*args, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue