From af2cb248bcb95c13b93de775c2ea6f367e2c0f8d Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 20 Feb 2011 19:51:52 +0100 Subject: [PATCH] [tests] fixup hardlink test --- libraries/tests/standalone/test_hardlinks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/tests/standalone/test_hardlinks.py b/libraries/tests/standalone/test_hardlinks.py index 525e8eb61..d43639bad 100644 --- a/libraries/tests/standalone/test_hardlinks.py +++ b/libraries/tests/standalone/test_hardlinks.py @@ -1,4 +1,4 @@ -import os, errno +import os, errno, stat from entropy.const import etpUi etpUi['quiet'] = True from entropy.server.interfaces import Server @@ -21,7 +21,8 @@ for repo_id in repos: except OSError as err: if err.errno != errno.ENOENT: raise - if st.st_nlink > 1: + continue + if stat.S_ISREG(st.st_mode) and (st.st_nlink > 1): # hard link ! print(atom) atom_cache.add(atom)