mirror of
https://github.com/pengutronix/monitoring-check-systemd-service.git
synced 2025-07-21 21:04:50 +02:00
replace find with in
This commit is contained in:
parent
b966e7cc01
commit
7f1889a730
@ -63,11 +63,11 @@ class Systemd_Service(nagiosplugin.Resource):
|
||||
})
|
||||
|
||||
def normalize(self):
|
||||
if self.unit.find('.') < 0:
|
||||
if '.' in self.unit:
|
||||
_log.debug('Found \'.\' in ServiceName, so assuming you know what youre asking for')
|
||||
else:
|
||||
self.unit = self.unit + '.service'
|
||||
_log.debug('Normalized unitname to check to %r', self.unit)
|
||||
else:
|
||||
_log.debug('Found \'.\' in ServiceName, so assuming you know what youre asking for')
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user