[elbe-devel] [PATCH v2 10/13] Debianize commands now use urwid's TUI
dion at linutronix.de
dion at linutronix.de
Thu Aug 1 17:49:31 CEST 2019
From: Olivier Dion <dion at linutronix.de>
Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Bastian Germann <bage at linutronix.de>
---
elbepack/commands/debianize.py | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/elbepack/commands/debianize.py b/elbepack/commands/debianize.py
index ad38a8ca..3e37c2e5 100644
--- a/elbepack/commands/debianize.py
+++ b/elbepack/commands/debianize.py
@@ -9,20 +9,19 @@ from __future__ import print_function
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)
+ TUI(detect_panel())()
except KeyError:
- print("This creates a debinization of a source directory.")
- print("The software was not able to identify the current directory.")
- print("Please run the command from source directory")
+ print("This creates a debianization of a source directory.\n"
+ "The software was not able to identify the current directory.\n"
+ "Please run the command from a valid source directory")
sys.exit(20)
--
2.11.0
More information about the elbe-devel
mailing list