def worker_get(context, **filters):
 query = _worker_query(context, **filters)
 worker = (query.first() if query else None)
 if (not worker):
  raise exception.WorkerNotFound(**filters)
 return worker

def worker_get ( context , ** filters ) : query = _worker_query ( context , ** filters ) worker = ( query . first ( ) if query else None ) if ( not worker ) : raise exception . WorkerNotFound ( ** filters ) return worker
get a worker or raise exception if it does not exist .