From da15e1b7d4696885c7c797d21b4061afa7e617c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrer=20=C3=96zen?= Date: Fri, 20 Jul 2007 10:59:54 +0000 Subject: [PATCH] even better --- pisi/util.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pisi/util.py b/pisi/util.py index 319a0be8..50296fbc 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -329,12 +329,10 @@ def clean_ar_timestamps(ar_file): def calculate_hash(path): """Return a (path, hash) tuple for given path.""" if os.path.islink(path): - try: - # For symlinks, path string is hashed instead of the content - value = sha1_data(os.readlink(path)) - except FileError: + # For symlinks, path string is hashed instead of the content + value = sha1_data(os.readlink(path)) + if not os.path.exists(path): ctx.ui.info(_("Including external link '%s'") % path) - value = None elif os.path.isdir(path): ctx.ui.info(_("Including directory '%s'") % path) value = None