[elbe-devel] [PATCH 16/32] Add logging to opt.log for command mkcdrom
dion at linutronix.de
dion at linutronix.de
Fri Jun 14 22:13:30 CEST 2019
From: Olivier Dion <dion at linutronix.de>
Signed-off-by: Olivier Dion <dion at linutronix.de>
---
elbepack/commands/mkcdrom.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/elbepack/commands/mkcdrom.py b/elbepack/commands/mkcdrom.py
index f00e9645..70a6ac0e 100644
--- a/elbepack/commands/mkcdrom.py
+++ b/elbepack/commands/mkcdrom.py
@@ -14,8 +14,8 @@ import os
from elbepack.elbeproject import ElbeProject
from elbepack.elbexml import ValidationError
-from elbepack.asciidoclog import StdoutLog, ASCIIDocLog
from elbepack.efilesystem import ChRootFilesystem
+from elbepack.log import log
from elbepack.cdroms import mk_source_cdrom, mk_binary_cdrom, CDROM_SIZE
@@ -61,6 +61,11 @@ def run_command(argv):
oparser.print_help()
sys.exit(20)
+ if opt.log:
+ log.new(log)
+ else:
+ log.stdout()
+
if not opt.rfs_only:
try:
project = ElbeProject(args[0], logpath=opt.log,
@@ -76,7 +81,6 @@ def run_command(argv):
xml = project.xml
arch = xml.text("project/arch", key="arch")
codename = xml.text("project/suite")
- log = project.log
init_codename = xml.get_initvm_codename()
else:
builddir = os.path.abspath(os.path.curdir)
@@ -85,10 +89,6 @@ def run_command(argv):
codename = opt.codename
init_codename = opt.init_codename
xml = None
- if opt.log:
- log = ASCIIDocLog(opt.log)
- else:
- log = StdoutLog()
generated_files = []
if opt.source:
--
2.11.0
More information about the elbe-devel
mailing list