summaryrefslogtreecommitdiff
path: root/whatmaps/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'whatmaps/command.py')
-rwxr-xr-xwhatmaps/command.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/whatmaps/command.py b/whatmaps/command.py
index 0a4eb7b..d0f5c3e 100755
--- a/whatmaps/command.py
+++ b/whatmaps/command.py
@@ -113,7 +113,12 @@ def find_systemd_units(procmap, distro):
for dummy, procs in procmap.items():
for proc in procs:
- unit = Systemd.process_to_unit(proc)
+ try:
+ unit = Systemd.process_to_unit(proc)
+ except ValueError as e:
+ logging.warning("No systemd unit found for '%s': %s"
+ "- restart manually" % (proc.exe, e))
+ continue
if not unit:
logging.warning("No systemd unit found for '%s'"
"- restart manually" % proc.exe)