summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmorphlib/app.py17
-rw-r--r--morphlib/builder2.py6
2 files changed, 9 insertions, 14 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index 6cc165d5..5fa268b5 100755
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -932,20 +932,13 @@ class Morph(cliapp.Application):
'''
- if 'msg' in kwargs:
- text = kwargs['msg'] % kwargs
- else:
- text = 'Morph tried to say something, but couldn\'t decide what'
-
- timestamp = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime())
- text = '%s %s' % (timestamp, text)
-
+ assert 'msg' in kwargs
+ text = kwargs['msg'] % kwargs
+
error = kwargs.get('error', False)
chatty = kwargs.get('chatty', False)
quiet = self.settings['quiet']
verbose = self.settings['verbose']
-
- ok = verbose or (quiet and error) or (not quiet and not chatty)
if error:
logging.error(text)
@@ -954,8 +947,10 @@ class Morph(cliapp.Application):
else:
logging.info(text)
+ ok = verbose or error or (not quiet and not chatty)
if ok:
- self.output.write('%s\n' % text)
+ timestamp = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime())
+ self.output.write('%s %s\n' % (timestamp, text))
self.output.flush()
def runcmd(self, argv, *args, **kwargs):
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index 6dc55d15..aaff29d3 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -570,7 +570,7 @@ class SystemBuilder(BuilderBase): # pragma: no cover
self.local_artifact_cache)
if len(overlaps) > 0:
self.app.status(msg='Overlaps in system artifact '
- '%(artifact_name)detected',
+ '%(artifact_name)s detected',
artifact_name=self.artifact.name,
error=True)
log_overlaps(overlaps)
@@ -632,10 +632,10 @@ class SystemBuilder(BuilderBase): # pragma: no cover
cwd=path)
def _install_boot_files(self, arch, sourcefs, targetfs):
- self.app.status(msg='Installing boot files into root volume',
- chatty=True)
with self.build_watch('install-boot-files'):
if arch in ('x86', 'x86_64', None):
+ self.app.status(msg='Installing boot files into root volume',
+ chatty=True)
shutil.copy2(os.path.join(sourcefs, 'extlinux.conf'),
os.path.join(targetfs, 'extlinux.conf'))
os.mkdir(os.path.join(targetfs, 'boot'))