def find_project_by_short_name(short_name, pbclient, all=None):
try:<EOL><INDENT>response = pbclient.find_project(short_name=short_name, all=all)<EOL>check_api_error(response)<EOL>if (len(response) == <NUM_LIT:0>):<EOL><INDENT>msg = '<STR_LIT>'<EOL>error = '<STR_LIT>'<EOL>raise ProjectNotFound(msg, error)<EOL><DEDENT>return response[<NUM_LIT:0>]<EOL><DEDENT>except exceptions.ConnectionError:<EOL><INDENT>raise<EOL><DEDENT>except ProjectNotFound:<EOL><INDENT>raise<EOL><DEDENT>
Return project by short_name.