From 6912364e3db81535ba7c4741c4ecfbf2feb2666c Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Tue, 3 Dec 2019 15:22:18 +0100
Subject: [PATCH] BUG: logout did not work

---
 src/caosdb/connection/authentication/interface.py | 6 +++---
 src/caosdb/utils/checkFileSystemConsistency.py    | 6 ++++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/caosdb/connection/authentication/interface.py b/src/caosdb/connection/authentication/interface.py
index ff5fb95c..c0e580a3 100644
--- a/src/caosdb/connection/authentication/interface.py
+++ b/src/caosdb/connection/authentication/interface.py
@@ -176,7 +176,7 @@ class CredentialsAuthenticator(AbstractAuthenticator):
         super(CredentialsAuthenticator, self).__init__()
         self._credentials_provider = credentials_provider
         self._connection = None
-        self._auth_token = None
+        self.auth_token = None
 
     def login(self):
         self._login()
@@ -186,9 +186,9 @@ class CredentialsAuthenticator(AbstractAuthenticator):
 
     def _logout(self):
         _LOGGER.debug("[LOGOUT]")
-        if self._auth_token is not None:
+        if self.auth_token is not None:
             self._connection.request(method="DELETE", path="logout")
-        self._auth_token = None
+        self.auth_token = None
 
     def _login(self):
         username = self._credentials_provider.username
diff --git a/src/caosdb/utils/checkFileSystemConsistency.py b/src/caosdb/utils/checkFileSystemConsistency.py
index 10e71f64..6dd35f8a 100755
--- a/src/caosdb/utils/checkFileSystemConsistency.py
+++ b/src/caosdb/utils/checkFileSystemConsistency.py
@@ -53,6 +53,12 @@ class CLIError(Exception):
 
 
 def runCheck(timeout, location):
+    """ Request the caosdb server to check the file system for consistency.
+
+    location == None means that the whole file system is being checked.
+    Otherwise only a the directory tree under location is being checked.
+    """
+
     if (timeout is not None):
         db.get_config().set("Connection", "timeout", str(100 + int(timeout)))
     files = db.Container().retrieve(
-- 
GitLab