[jhbuild] [tarball] don't fail on incorrect hash attribute
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [jhbuild] [tarball] don't fail on incorrect hash attribute
- Date: Wed, 29 Jul 2009 11:37:06 +0000 (UTC)
commit 4dc8141a302bc73b188f9389a50636027123bbe7
Author: Frédéric Péters <fpeters 0d be>
Date: Wed Jul 29 11:29:20 2009 +0200
[tarball] don't fail on incorrect hash attribute
jhbuild/versioncontrol/tarball.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/versioncontrol/tarball.py b/jhbuild/versioncontrol/tarball.py
index dc85d62..ae4ab22 100644
--- a/jhbuild/versioncontrol/tarball.py
+++ b/jhbuild/versioncontrol/tarball.py
@@ -167,7 +167,11 @@ class TarballBranch(Branch):
_('downloaded file size is incorrect (expected %(size1)d, got %(size2)d)')
% {'size1':self.source_size, 'size2':local_size})
if self.source_hash is not None:
- algo, hash = self.source_hash.split(':')
+ try:
+ algo, hash = self.source_hash.split(':')
+ except ValueError:
+ logging.warning(_('invalid hash attribute on module %s') % self.module)
+ return
if hasattr(hashlib, algo):
local_hash = getattr(hashlib, algo)()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]