Commit
5eda645e36 (ovsdb-server: Report time since last connect and disconnect
for each manager.) used a conditional expression in reconnect.py. That syntax
is only supported in Python 2.5 and later. XenServer 5.6 is based on RHEL 5,
which uses Python 2.4.3, so various OVS scripts on XenServer fail with Python
tracebacks.
Reported-by: Cedric Hobbs <cedric@nicira.com>
stats.is_connected = self.is_connected()
stats.msec_since_connect = self.get_last_connect_elapsed(now)
stats.msec_since_disconnect = self.get_last_disconnect_elapsed(now)
- stats.total_connected_duration = self.total_connected_duration + \
- (self.get_last_connect_elapsed(now) if self.is_connected() else 0)
+ stats.total_connected_duration = self.total_connected_duration
+ if self.is_connected():
+ stats.total_connected_duration += self.get_last_connect_elapsed(now)
stats.n_attempted_connections = self.n_attempted_connections
stats.n_successful_connections = self.n_successful_connections
stats.state = self.state.name