mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Update src/yunohost/service.py
This commit is contained in:
parent
58a29f218e
commit
f25e07fd82
1 changed files with 5 additions and 2 deletions
|
@ -427,8 +427,11 @@ def service_log(name, number=50):
|
|||
|
||||
for log_path in log_list:
|
||||
# log is a file, read it
|
||||
if not os.path.isdir(log_path):
|
||||
result[log_path] = _tail(log_path, number) if os.path.exists(log_path) else []
|
||||
if os.path.isfile(log_path):
|
||||
result[log_path] = _tail(log_path, number)
|
||||
continue
|
||||
elif not os.path.isdir(log_path):
|
||||
result[log_path] = []
|
||||
continue
|
||||
|
||||
for log_file in os.listdir(log_path):
|
||||
|
|
Loading…
Add table
Reference in a new issue