Add a method to cmdline.py:InstallInterface to handle missing attrs.
The presence of this method means that we no longer need to add methods to
the cmdline interface that just sleep, as missing methods will map to
__getattr__ and sleep there.
---
cmdline.py | 46 +++++++++++-----------------------------------
1 files changed, 11 insertions(+), 35 deletions(-)
+ 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