Catch error

This commit is contained in:
rdb 2010-11-13 14:18:19 +00:00
parent cc7b6642e5
commit 7e3897d38e

View File

@ -217,13 +217,16 @@ class Installer:
for name, version in self.requirements: for name, version in self.requirements:
package = host.getPackage(name, version, platform) package = host.getPackage(name, version, platform)
if not package:
Installer.notify.error(" -> %s failed for platform %s" % (package.packageName, package.platform))
continue
package.installed = True # Hack not to let it install itself package.installed = True # Hack not to let it install itself
packages.append(package) packages.append(package)
if not package.downloadDescFile(self.http): if not package.downloadDescFile(self.http):
Installer.notify.warning(" -> %s failed for platform %s" % (package.packageName, package.platform)) Installer.notify.error(" -> %s failed for platform %s" % (package.packageName, package.platform))
continue continue
if not package.downloadPackage(self.http): if not package.downloadPackage(self.http):
Installer.notify.warning(" -> %s failed for platform %s" % (package.packageName, package.platform)) Installer.notify.error(" -> %s failed for platform %s" % (package.packageName, package.platform))
continue continue
# Also install the 'images' package from the same host that p3dembed was downloaded from. # Also install the 'images' package from the same host that p3dembed was downloaded from.
@ -238,10 +241,10 @@ class Installer:
package.installed = True # Hack not to let it install itself package.installed = True # Hack not to let it install itself
packages.append(package) packages.append(package)
if not package.downloadDescFile(self.http): if not package.downloadDescFile(self.http):
Installer.notify.warning(" -> %s failed for platform %s" % (package.packageName, package.platform)) Installer.notify.error(" -> %s failed for platform %s" % (package.packageName, package.platform))
continue continue
if not package.downloadPackage(self.http): if not package.downloadPackage(self.http):
Installer.notify.warning(" -> %s failed for platform %s" % (package.packageName, package.platform)) Installer.notify.error(" -> %s failed for platform %s" % (package.packageName, package.platform))
continue continue
break break