feat: Add AUTH_PATH as a class constant
This commit is contained in:
4
main.py
4
main.py
@@ -12,11 +12,13 @@ except ImportError:
|
|||||||
|
|
||||||
|
|
||||||
class Auditui:
|
class Auditui:
|
||||||
|
AUTH_PATH = Path.home() / ".config" / "auditui" / "auth.json"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.auth = None
|
self.auth = None
|
||||||
|
|
||||||
def login_to_audible(self):
|
def login_to_audible(self):
|
||||||
auth_file = Path.home() / ".config" / "auditui" / "auth.json"
|
auth_file = self.AUTH_PATH
|
||||||
auth_file.parent.mkdir(parents=True, exist_ok=True)
|
auth_file.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
if auth_file.exists():
|
if auth_file.exists():
|
||||||
|
|||||||
Reference in New Issue
Block a user