log: minor clean up (#945)

This commit is contained in:
Maksym Naboka
2017-03-20 18:28:39 -07:00
committed by tamarrow
parent cf75088d52
commit 034f3b8d1b
2 changed files with 2 additions and 4 deletions

View File

@@ -262,7 +262,7 @@ def logging_strategy():
try:
strategy = response['uiConfiguration']['plugins']['mesos']['logging-strategy'] # noqa: ignore=F403,E501
except KeyError:
except Exception:
pass
return strategy

View File

@@ -520,14 +520,12 @@ def _log(follow, lines, leader, slave, component, filters):
lines = util.parse_int(lines)
# if journald logging is disabled. Read from files API and exit.
# https://github.com/dcos/dcos/blob/master/gen/calc.py#L151
if not log.has_journald_capability():
if component or filters:
raise DCOSException('--component or --filter is not '
'supported by files API')
# fail back to mesos files API.
# fall back to mesos files API.
mesos_files = _mesos_files(leader, slave)
log.log_files(mesos_files, follow, lines)
return 0