Bugfix: Set folder_db for csv database
This fixes the error message:
[ERROR] sharing database cannot be initialized: UnboundLocalError("cannot access local variable 'folder_db' where it is not associated with a value")
This commit is contained in:
@@ -40,6 +40,8 @@ class Sharing(sharing.BaseSharing):
|
|||||||
sharing_db_file = os.path.join(folder_db, "sharing.csv")
|
sharing_db_file = os.path.join(folder_db, "sharing.csv")
|
||||||
logger.info("sharing database filename not provided, use default: %r", sharing_db_file)
|
logger.info("sharing database filename not provided, use default: %r", sharing_db_file)
|
||||||
else:
|
else:
|
||||||
|
sharing_db_file = os.path.abspath(sharing_db_file)
|
||||||
|
folder_db = os.path.dirname(sharing_db_file)
|
||||||
logger.info("sharing database filename: %r", sharing_db_file)
|
logger.info("sharing database filename: %r", sharing_db_file)
|
||||||
|
|
||||||
if not os.path.exists(folder_db):
|
if not os.path.exists(folder_db):
|
||||||
|
|||||||
Reference in New Issue
Block a user