mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Fixed Python 3 issues when adding a new session
This commit is contained in:
parent
dcc4f4c782
commit
ae81dd94a5
@ -32,9 +32,9 @@ class sessionManager(object):
|
||||
|
||||
def add_session(self, id):
|
||||
log.debug("Adding a new session: %s" % (id,))
|
||||
path = paths.config_path(id)
|
||||
path = os.path.join(paths.config_path(), id)
|
||||
if not os.path.exists(path):
|
||||
log.debug("Creating %s path" % (paths.config_path(path),))
|
||||
log.debug("Creating %s path" % (os.path.join(paths.config_path(), path),))
|
||||
os.mkdir(path)
|
||||
config.app["sessions"]["sessions"].append(id)
|
||||
|
||||
@ -43,7 +43,7 @@ class sessionManager(object):
|
||||
config.app.write()
|
||||
|
||||
def is_valid(self, id):
|
||||
if not os.path.exists(paths.config_path(id)):
|
||||
if not os.path.exists(os.path.join(paths.config_path(), id)):
|
||||
raise session_exceptions.NonExistentSessionError("That session does not exist.")
|
||||
config.app["sessions"]["current_session"] = ""
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user