[PATCH][python-meh] Add option to remove the 'Debug' option/button for mainExceptionWindow

Brian C. Lane bcl at redhat.com
Thu Feb 12 00:54:11 UTC 2015


On Wed, Feb 11, 2015 at 05:06:26PM +0100, Vojtech Trefny wrote:
> Default is the sys.stdout.isatty function which causes the debug option is not present when there is no terminal/tty to display the debugger.
> ---
>  meh/ui/__init__.py |  3 ++-
>  meh/ui/gui.py      | 10 ++++++++--
>  meh/ui/text.py     |  9 ++++++---
>  3 files changed, 16 insertions(+), 6 deletions(-)
> 
> diff --git a/meh/ui/__init__.py b/meh/ui/__init__.py
> index 8c174e1..053025f 100644
> --- a/meh/ui/__init__.py
> +++ b/meh/ui/__init__.py
> @@ -47,12 +47,13 @@ class AbstractIntf(object):
>          """
>          raise NotImplementedError
>  
> -    def mainExceptionWindow(self, text, exnFile, *args, **kwargs):
> +    def mainExceptionWindow(self, text, exnFile, allowDebug, *args, **kwargs):

This is a change to the API that users like Anaconda expect. I think
instead of making it a mandatory argument it should be a keyword with
None as the default and should setup some sensible default test if it
isn't passed.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list