lol oops
This commit is contained in:
parent
381d8c28ef
commit
1cfb5f7535
8
app.py
8
app.py
|
@ -18,15 +18,15 @@ website_dir = None
|
||||||
def current_website_dir():
|
def current_website_dir():
|
||||||
session.pop('website_dir', None)
|
session.pop('website_dir', None)
|
||||||
if session['requests'] % 5 == 0:
|
if session['requests'] % 5 == 0:
|
||||||
session['website_dir'] = str(ROOT_DIR+"/Marvel")
|
session['website_dir'] = (os.path.join(ROOT_DIR, 'Marvel'))
|
||||||
elif session['requests'] % 6 == 0:
|
elif session['requests'] % 6 == 0:
|
||||||
session['website_dir'] = str(ROOT_DIR+"/Escape")
|
session['website_dir'] = (os.path.join(ROOT_DIR, 'Escape'))
|
||||||
session.pop('requests', None)
|
session.pop('requests', None)
|
||||||
else:
|
else:
|
||||||
global WEBSITE_DIRS
|
global WEBSITE_DIRS
|
||||||
try:
|
try:
|
||||||
WEBSITE_DIRS.remove(os.path.isdir(os.path.join(ROOT_DIR, 'Escape')))
|
WEBSITE_DIRS.remove(os.path.join(ROOT_DIR, 'Marvel'))
|
||||||
WEBSITE_DIRS.remove(os.path.isdir(os.path.join(ROOT_DIR, 'Marvel')))
|
WEBSITE_DIRS.remove(os.path.join(ROOT_DIR, 'Escape'))
|
||||||
except (ValueError, IndexError) as e:
|
except (ValueError, IndexError) as e:
|
||||||
pass
|
pass
|
||||||
session['website_dir'] = random.choice(WEBSITE_DIRS)
|
session['website_dir'] = random.choice(WEBSITE_DIRS)
|
||||||
|
|
Loading…
Reference in New Issue