[elbe-devel] [PATCH 1/2] elbepack: pbuilder: remove unneeded function ensure_outdir()
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Jul 22 10:42:32 CEST 2024
The function is effectively the same as default option value.
Just more complicated.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/commands/pbuilder.py | 2 +-
elbepack/pbuilderaction.py | 11 +----------
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/elbepack/commands/pbuilder.py b/elbepack/commands/pbuilder.py
index f0ef6b6e7aa2..e2af5a88c850 100644
--- a/elbepack/commands/pbuilder.py
+++ b/elbepack/commands/pbuilder.py
@@ -35,7 +35,7 @@ def run_command(argv):
oparser.add_option('--source', dest='srcdir', default='.',
help='directory containing sources')
- oparser.add_option('--output', dest='outdir', default=None,
+ oparser.add_option('--output', dest='outdir', default='..',
help='directory where to save downloaded Files')
oparser.add_option('--profile', dest='profile', default='',
diff --git a/elbepack/pbuilderaction.py b/elbepack/pbuilderaction.py
index 453b14d43d9a..41685777c379 100644
--- a/elbepack/pbuilderaction.py
+++ b/elbepack/pbuilderaction.py
@@ -14,13 +14,6 @@ from elbepack.xmlpreprocess import preprocess_file
# if necessary
-def ensure_outdir(opt):
- if opt.outdir is None:
- opt.outdir = '..'
-
- print(f'Saving generated Files to {opt.outdir}')
-
-
class PBuilderError(Exception):
pass
@@ -266,11 +259,9 @@ class BuildAction(PBuilderAction):
print(f"Get Files with: 'elbe control get_file {prjdir} <filename>'")
else:
print('')
- print('Getting generated Files')
+ print(f'Saving generated Files to {opt.outdir}')
print('')
- ensure_outdir(opt)
-
try:
run_elbe(['control', 'get_files', '--pbuilder-only',
'--output', opt.outdir, prjdir], check=True)
--
2.45.2
More information about the elbe-devel
mailing list