FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 03-02-2012, 04:02 PM
David Lehman
 
Default The error handler is not callable. Call the 'cb' method.

---
pyanaconda/packaging/__init__.py | 6 +++---
pyanaconda/packaging/livepayload.py | 2 +-
pyanaconda/packaging/yumpayload.py | 16 ++++++++--------
3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index 93d854d..2f7d59a 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -300,7 +300,7 @@ class Payload(object):
device.format.setup(mountpoint=mountpoint)
except StorageError as e:
exn = PayloadSetupError(str(e))
- if errorHandler(exn) == ERROR_RAISE:
+ if errorHandler.cb(exn) == ERROR_RAISE:
raise exn

def _setupNFS(self, mountpoint, server, path, options):
@@ -317,7 +317,7 @@ class Payload(object):
isys.mount(url, mountpoint, options=options)
except SystemError as e:
exn = PayloadSetupError(str(e))
- if errorHandler(exn) == ERROR_RAISE:
+ if errorHandler.cb(exn) == ERROR_RAISE:
raise exn


@@ -380,7 +380,7 @@ class ImagePayload(Payload):
def setup(self, storage):
if not self.image_file:
exn = PayloadSetupError("image file not set")
- if errorHandler(exn) == ERROR_RAISE:
+ if errorHandler.cb(exn) == ERROR_RAISE:
raise exn

class ArchivePayload(ImagePayload):
diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py
index 71d1ea4..90408e7 100644
--- a/pyanaconda/packaging/livepayload.py
+++ b/pyanaconda/packaging/livepayload.py
@@ -69,5 +69,5 @@ class LiveImagePayload(ImagePayload):

if err:
exn = PayloadInstallError(err)
- if errorHandler(exn) == ERROR_RAISE:
+ if errorHandler.cb(exn) == ERROR_RAISE:
raise exn
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index d8d499c..12f1797 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -209,7 +209,7 @@ reposdir=/etc/yum.repos.d,/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/t
image = findFirstIsoImage(path)
if not image:
exn = PayloadSetupError("failed to find valid iso image")
- if errorHandler(exn) == ERROR_RAISE:
+ if errorHandler.cb(exn) == ERROR_RAISE:
raise exn

if path.endswith(".iso"):
@@ -501,7 +501,7 @@ reposdir=/etc/yum.repos.d,/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/t
log.warning(msg)

exn = DependencyError(msgs)
- rc = errorHandler(exn)
+ rc = errorHandler.cb(exn)
if rc == ERROR_RAISE:
raise exn
elif rc == ERROR_RETRY:
@@ -539,7 +539,7 @@ reposdir=/etc/yum.repos.d,/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/t
except RepoError as e:
log.error("error populating transaction: %s" % e)
exn = PayloadInstallError(str(e))
- if errorHandler(exn) == ERROR_RAISE:
+ if errorHandler.cb(exn) == ERROR_RAISE:
raise exn

log.debug("check transaction set")
@@ -565,21 +565,21 @@ reposdir=/etc/yum.repos.d,/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/t
except PackageSackError as e:
log.error("error running transaction: %s" % e)
exn = PayloadInstallError(str(e))
- if errorHandler(exn) == ERROR_RAISE:
+ if errorHandler.cb(exn) == ERROR_RAISE:
raise exn
except YumRPMTransError as e:
log.error("error running transaction: %s" % e)
for error in e.errors:
log.error(e[0])
exn = PayloadInstallError(str(e))
- if errorHandler(exn) == ERROR_RAISE:
+ if errorHandler.cb(exn) == ERROR_RAISE:
raise exn
except YumBaseError as e:
log.error("error [2] running transaction: %s" % e)
for error in e.errors:
log.error("%s" % e[0])
exn = PayloadInstallError(str(e))
- if errorHandler(exn) == ERROR_RAISE:
+ if errorHandler.cb(exn) == ERROR_RAISE:
raise exn
finally:
self._yum.ts.close()
@@ -670,7 +670,7 @@ class RPMCallback(object):
package_path = repo.getPackage(txmbr.po)
except (yum.Errors.NoMoreMirrorsRepoError, IOError):
exn = PayloadInstallError("failed to open package")
- if errorHandler(exn, txmbr.po) == ERROR_RAISE:
+ if errorHandler.cb(exn, txmbr.po) == ERROR_RAISE:
raise exn
except yum.Errors.RepoError:
continue
@@ -705,5 +705,5 @@ class RPMCallback(object):
# unpack problems.
if event != rpm.RPMCALLBACK_SCRIPT_ERROR or total:
exn = PayloadInstallError("cpio, unpack, or fatal script error")
- if errorHandler(exn, name) == ERROR_RAISE:
+ if errorHandler.cb(exn, name) == ERROR_RAISE:
raise exn
--
1.7.9.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org