def _open_state():
 try:
  with open(config['statefile'].as_filename(), 'rb') as f:
   return pickle.load(f)
 except Exception as exc:
  log.debug(u'state file could not be read: {0}', exc)
  return {}

def _open_state ( ) : try : with open ( config [ 'statefile' ] . as_filename ( ) , 'rb' ) as f : return pickle . load ( f ) except Exception as exc : log . debug ( u'state file could not be read: {0}' , exc ) return { }
reads the state file .