Skip to content

Commit

Permalink
Initialize Monitor::compat
Browse files Browse the repository at this point in the history
Monitor::status() can access the self.compat property before it is set by
the first loop. So initialize in __init__ instead.
  • Loading branch information
cvaroqui committed Nov 4, 2017
1 parent f813d6c commit 4e1fedb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/osvcd_mon.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ class Monitor(shared.OsvcThread, Crypt):
def __init__(self):
shared.OsvcThread.__init__(self)
self._shutdown = False
self.compat = True

def run(self):
self.log = logging.getLogger(rcEnv.nodename+".osvcd.monitor")
self.last_run = 0
self.log.info("monitor started")
self.startup = datetime.datetime.utcnow()
self.rejoin_grace_period_expired = False
self.compat = True

try:
while True:
Expand Down

0 comments on commit 4e1fedb

Please sign in to comment.