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 > Debian > Debian Kernel

LinkBack Thread Tools
Old 12-22-2011, 10:48 AM
Martin Gracik
Default Check if the anaconda attribute is set in YumSorter (#756707)

The YumSorter class is used in pkgorder script during the compose.
If it's run this way the class does not have the anaconda attribute
set, so we need to make sure we do not try to access it.
yuminstall.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index 984366a..46ac375 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -462,9 +462,11 @@ class YumSorter(yum.YumBase):

# XXX: ATTENTION the self.anaconda is in the AnacondaYum class,
- # which subclasses this class and inherits this method and is actually used;
+ # which subclasses this class and inherits this method;
# very ugly, but I don't want to move the whole method...
- if (self.anaconda.isKickstart and
+ # do this part only if it's used from AnacondaYum class,
+ # pkgorder uses the YumSorter class, but does not need this functionality
+ if (hasattr(self, 'anaconda') and self.anaconda.isKickstart and
'conflicts' in map(str.lower, self.anaconda.id.ksdata.excludedGroupList)):

# get the list of packages in @conflicts group for the first time,

Anaconda-devel-list mailing list

Thread Tools

All times are GMT. The time now is 01:10 PM.

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