示例#1
0
    def packageFinished(self, package, success):
        PackageInstaller.packageFinished(self, package, success)
        if not success:
            print 'Failed to download %s' % package.packageName
            return None

        phase = self.launcher.phasesByPackageName[package.packageName]
        self.launcher.phaseData[phase].markComplete()
示例#2
0
    def packageFinished(self, package, success):
        """ This callback is made for each package between
        downloadStarted() and downloadFinished() to indicate that a
        package has finished downloading.  If success is true, there
        were no problems and the package is now installed.

        If this package did not require downloading (because it was
        already downloaded), this callback will be made immediately,
        *without* a corresponding call to packageStarted(), and may
        even be made before downloadStarted(). """

        PackageInstaller.packageFinished(self, package, success)
        if not success:
            print "Failed to download %s" % (package.packageName)
            self.launcher.setPandaErrorCode(6)
            sys.exit()

        phase = self.launcher.phasesByPackageName[package.packageName]
        self.launcher.phaseData[phase].markComplete()