From 8b533c8a095f94dcb4bf472b54d63d4a3fd88910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sun, 5 Nov 2006 19:17:33 +0000 Subject: [PATCH] =?UTF-8?q?SUM=20alamazsan,=20mesela=20symlink=20olmas?= =?UTF-8?q?=C4=B1=20gereken=20=C5=9Fey=20klas=C3=B6rse,=20i=C5=9Flemi=20ke?= =?UTF-8?q?sme=20sadece=20hatay=C4=B1=20g=C3=B6ster?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/api.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pisi/api.py b/pisi/api.py index bb75c768..f36a329c 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -355,11 +355,14 @@ def check(package): if file.hash and file.type != "config" \ and not os.path.islink('/' + file.path): ctx.ui.info(_("Checking /%s ") % file.path, noln=True, verbose=True) - if file.hash != util.sha1_file('/' + file.path): - corrupt.append(file) - ctx.ui.info(_("\nCorrupt file: %s") % file, noln=True) - else: - ctx.ui.info(_("OK"), verbose=True) + try: + if file.hash != util.sha1_file('/' + file.path): + corrupt.append(file) + ctx.ui.info(_("\nCorrupt file: %s") % file, noln=True) + else: + ctx.ui.info(_("OK"), verbose=True) + except pisi.util.FileError: + ctx.ui.error(_("\nI/O Error: Cannot calculate SHA1 hash of %s") % file) return corrupt def index(dirs=None, output='pisi-index.xml', skip_sources=False, skip_signing=False):