Renaming folder for consistency

This commit is contained in:
Bipin 2023-08-31 11:25:26 +05:30
parent e595931a1e
commit 14a1fe0afa
4 changed files with 10 additions and 10 deletions

View file

@ -20,7 +20,7 @@ def loginADE(email, password):
print("Email or Password cannot be empty")
print()
return
if not exists('account'): mkdir('account')
if not exists('degourou'): mkdir('degourou')
loginAndGetKey(email, password)
print()
@ -33,7 +33,7 @@ def loginIA(email,password):
print()
def start(acsmFile, outputFilename):
if not exists('account'): mkdir('account')
if not exists('degourou'): mkdir('degourou')
# setting up the account and keys
if not (exists(FILE_ACTIVATIONXML) and exists(FILE_DEVICEXML) and exists(FILE_DEVICEKEY) and exists(KEYPATH)):
@ -103,8 +103,8 @@ def main():
# Logout
if args.lo:
from shutil import rmtree
rmtree("account")
mkdir('account')
rmtree("degourou")
mkdir('degourou')
print()
print("Logout Sucessfull")
print()

View file

@ -1 +1 @@
KEYPATH = "account/adobekey.der"
KEYPATH = "degourou/adobekey.der"

View file

@ -7,7 +7,7 @@ import string
import pickle
SESSION_FILE = 'account/session.pkl'
SESSION_FILE = 'degourou/session.pkl'
session = None
if path.exists(SESSION_FILE):
with open(SESSION_FILE, 'rb') as f: session = pickle.load(f)
@ -116,7 +116,7 @@ def return_loan(book_id):
# manage
def manage_login(email,password):
global session
if not path.exists('account'): mkdir('account')
if not path.exists('degourou'): mkdir('degourou')
sess = login(email,password)
if sess is not None:
with open(SESSION_FILE, 'wb') as f: pickle.dump(sess, f)

View file

@ -1,3 +1,3 @@
FILE_DEVICEKEY = "account/devicesalt"
FILE_DEVICEXML = "account/device.xml"
FILE_ACTIVATIONXML = "account/activation.xml"
FILE_DEVICEKEY = "degourou/devicesalt"
FILE_DEVICEXML = "degourou/device.xml"
FILE_ACTIVATIONXML = "degourou/activation.xml"