[elbe-devel] [PATCH 11/14] Debianize commands now use urwid TUI

Bastian Germann bage at linutronix.de
Thu Aug 1 15:48:33 CEST 2019


> From: Olivier Dion <dion at linutronix.de>
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>
> ---
>  elbepack/commands/debianize.py | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/elbepack/commands/debianize.py b/elbepack/commands/debianize.py
> index ad38a8ca..29aeaeee 100644
> --- a/elbepack/commands/debianize.py
> +++ b/elbepack/commands/debianize.py
> @@ -4,25 +4,18 @@
>  #
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  
> -from __future__ import print_function

Please keep the future for Py2 (see answer to cover letter)

>  
>  import os
>  import sys
>  
> -from elbepack.debianize.debianize import Debianize, DebianizeBase
> +from elbepack.debianize.base.tui import TUI
> +from elbepack.debianize.panels.factory import detect_panel
>  
>  
>  def run_command(_args):
> +
>      if os.path.exists('debian'):
>          print("debian folder already exists, nothing to do")
>          sys.exit(10)
>  
> -    try:
> -        debianizer = DebianizeBase.get_debianizer()
> -        Debianize(debianizer).run()
> -        sys.exit(10)
> -    except KeyError:
> -        print("This creates a debinization of a source directory.")

debianization

> -        print("The software was not able to identify the current directory.")
> -        print("Please run the command from source directory")
> -        sys.exit(20)
> +    TUI(detect_panel())()
> 

With these changes
Reviewed-by: Bastian Germann <bage at linutronix.de>



More information about the elbe-devel mailing list