Skip to content

Commit

Permalink
Merge branch 'bugfix/log-extra-colon' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sirosen committed Jul 26, 2014
2 parents 1be3cba + 4882147 commit 42a8a9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions salve/util/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ def log(self, log_type, message, file_context=None,
# if hide_context is false, prepend it to the message with
# a colon separator. Otherwise, it will be omitted
if not hide_context:
ctx_prefix = '[' + str(ectx) + ']'
ctx_prefix = '[' + str(ectx) + '] '
if file_context is not None:
ctx_prefix += ' ' + str(file_context)
ctx_prefix += str(file_context) + ': '

message = ctx_prefix + ': ' + message
message = ctx_prefix + message

# construct message prefix
ty_prefix = '[' + log_type + ']'
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/execute/modify_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def mock_chmod(f, mode):

assert log['chmod'] is None
assert (self.stderr.getvalue() ==
('[WARN] [VERIFICATION]: ' +
('[WARN] [VERIFICATION] ' +
'FileChmod: Unowned target file "a"\n')), self.stderr.getvalue()

@istest
Expand All @@ -214,7 +214,7 @@ def mock_lchown(f_or_d, uid, gid):
act()

assert len(lchown_args) == 0
assert (self.stderr.getvalue() == ('[WARN] [EXECUTION]: ' +
assert (self.stderr.getvalue() == ('[WARN] [EXECUTION] ' +
'DirChown: Cannot Chown as Non-Root User\n')), \
self.stderr.getvalue()

Expand All @@ -241,7 +241,7 @@ def mock_chmod(f_or_d, mode):
act()

assert len(chmod_args) == 0
assert (self.stderr.getvalue() == ('[WARN] [EXECUTION]: ' +
assert (self.stderr.getvalue() == ('[WARN] [EXECUTION] ' +
'DirChmod: Unowned target dir "a"\n')), self.stderr.getvalue()

@istest
Expand All @@ -266,7 +266,7 @@ def mock_lchown(f_or_d, uid, gid):
act()

assert len(lchown_args) == 0
assert (self.stderr.getvalue() == ('[WARN] [EXECUTION]: ' +
assert (self.stderr.getvalue() == ('[WARN] [EXECUTION] ' +
'DirChown: Cannot Chown as Non-Root User\n')), \
self.stderr.getvalue()

Expand Down Expand Up @@ -295,7 +295,7 @@ def mock_chmod(f_or_d, mode):
act()

assert len(chmod_args) == 0
assert (self.stderr.getvalue() == ('[WARN] [EXECUTION]: ' +
assert (self.stderr.getvalue() == ('[WARN] [EXECUTION] ' +
'DirChmod: Unowned target dir "a"\n')), self.stderr.getvalue()

@istest
Expand Down

0 comments on commit 42a8a9a

Please sign in to comment.