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.lah...@gmail.com> --- src/jarabe/journal/model.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py index fd25681..4094fe6 100644 --- a/src/jarabe/journal/model.py +++ b/src/jarabe/journal/model.py @@ -530,11 +530,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): -- 1.7.4.4 _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel