From beed6b368b026f5c4c4a088a4832259f09b4e9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Fri, 26 Jul 2013 13:23:33 +0200 Subject: [PATCH] Simplify wait_for_mount() --- attic/testsuite/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/attic/testsuite/__init__.py b/attic/testsuite/__init__.py index f21ad76d7..b35b966cb 100644 --- a/attic/testsuite/__init__.py +++ b/attic/testsuite/__init__.py @@ -58,10 +58,9 @@ def _assert_dirs_equal_cmp(self, diff, fuse=False): def wait_for_mount(self, path, timeout=5): """Wait until a filesystem is mounted on `path` """ - parent_dev = os.stat(os.path.dirname(path)).st_dev timeout += time.time() while timeout > time.time(): - if os.stat(path).st_dev != parent_dev: + if os.path.ismount(path): return time.sleep(.1) raise Exception('wait_for_mount(%s) timeout' % path)