fix systemd bug
Change-Id: I8a3f1eddba9525589757d4612a5060267ea0c5db
This commit is contained in:
parent
ee31f8fb45
commit
f6868da3b9
@ -169,7 +169,7 @@ class Parameter(Accessible):
|
||||
OrType(FloatRange(0), EnumType(always=0, never=999999999, default=-1)),
|
||||
export=False, default=-1)
|
||||
influences = Property(
|
||||
'optional hint about effected parameters', ArrayOf(StringType()),
|
||||
'optional hint about affected parameters', ArrayOf(StringType()),
|
||||
extname='influences', export=True, mandatory=False, default=[])
|
||||
|
||||
# used on the instance copy only
|
||||
@ -367,7 +367,7 @@ class Command(Accessible):
|
||||
'datatype of the result from the command, or None', NoneOr(DataTypeType()),
|
||||
export=False, mandatory=True)
|
||||
influences = Property(
|
||||
'optional hint about effected parameters', ArrayOf(StringType()),
|
||||
'optional hint about affected parameters', ArrayOf(StringType()),
|
||||
extname='influences', export=True, mandatory=False, default=[])
|
||||
|
||||
func = None
|
||||
|
@ -45,6 +45,7 @@ except ImportError:
|
||||
DaemonContext = None
|
||||
|
||||
try:
|
||||
# pylint: disable=unused-import
|
||||
import systemd.daemon
|
||||
except ImportError:
|
||||
systemd = None
|
||||
@ -132,8 +133,12 @@ class Server:
|
||||
while self._restart:
|
||||
self._restart = False
|
||||
try:
|
||||
if systemd:
|
||||
# TODO: make systemd notifications configurable
|
||||
if systemd: # pylint: disable=used-before-assignment
|
||||
systemd.daemon.notify("STATUS=initializing")
|
||||
except Exception:
|
||||
systemd = None # pylint: disable=redefined-outer-name
|
||||
try:
|
||||
self._processCfg()
|
||||
if self._testonly:
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user