def get_maintenance():
 if (not database):
  return None
 maintenance_state = database.maintenance.find_one({'maintenance': True})
 if maintenance_state:
  return {'start': maintenance_state.get('start'), 'end': maintenance_state.get('end')}
 else:
  return None

def get_maintenance ( ) : if ( not database ) : return None maintenance_state = database . maintenance . find_one ( { 'maintenance' : True } ) if maintenance_state : return { 'start' : maintenance_state . get ( 'start' ) , 'end' : maintenance_state . get ( 'end' ) } else : return None
get the current start and end times for the maintenance state .