Re: [PATCH] Add a method to cmdline.py:InstallInterface to handle missing attrs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux