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 > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-04-2010, 06:47 AM
Ales Kozumplik
 
Default Add a method to cmdline.py:InstallInterface to handle missing attrs.

On 02/03/2010 05:05 PM, Chris Lumens wrote:

+ def __getattr__(self, attr):
+ # This method is called if "attr" does not exist in this class. It's
+ # useful for catching calls to methods that other InstallInterface
+ # classes have but cmdline mode does not.
+ print(_("Can't have a question in command line mode!"))
+ print("(%s)" % attr)
+
+ # don't exit
+ while True:
+ time.sleep(5)
+
def __del__(self):
pass


Ack. The new __getattr__ method really ties the class together.

Ales

_______________________________________________
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 06:35 PM.

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