Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Abente <martin.abente.lahaye@gmail.com>2011-06-09 16:11:10 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-08-19 11:13:51 (GMT)
commit5d04cde09a512c2a9d842fa7fbaa51839917ecf0 (patch)
tree346050ab04bfa4c4c7f301836756dc1b9fa67164
parent1e9ed378fe3b10a91d4c6b9d35874dd8f7052ea8 (diff)
Model._get_mount_point loops forever
Fixes the stop condition, so it won't loop forever when the object_id belongs to the local FS. In that case, it will return "None" to avoid ambiguity with what we refer to "/". Signed-off-by: Martin Abente <martin.abente.lahaye@gmail.com> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/jarabe/journal/model.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index ddf9c07..1242787 100644
--- a/src/jarabe/journal/model.py
+++ b/src/jarabe/journal/model.py
@@ -532,11 +532,12 @@ def find(query_, page_size):
def _get_mount_point(path):
dir_path = os.path.dirname(path)
- while True:
+ while dir_path:
if os.path.ismount(dir_path):
return dir_path
else:
dir_path = dir_path.rsplit(os.sep, 1)[0]
+ return None
def get(object_id):