<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> import abdt_exception <EOL> def getPrimaryUserDetailsFromBranch ( conduit , branch ) : <EOL> """<STR_LIT>""" <EOL> names_emails = branch . get_author_names_emails ( ) <EOL> if not names_emails : <EOL> raise abdt_exception . NoHistoryException ( <EOL> branch . review_branch_name ( ) , <EOL> branch . base_branch_name ( ) ) <EOL> committer = names_emails [ - <NUM_LIT:1> ] <EOL> name = committer [ <NUM_LIT:0> ] <EOL> email = committer [ <NUM_LIT:1> ] <EOL> found_user = conduit . query_name_and_phid_from_email ( email ) <EOL> if found_user is None : <EOL> raise abdt_exception . AbdUserException ( <EOL> "<STR_LIT>" ) <EOL> user , phid = found_user <EOL> return name , email , user , phid <EOL> def getAnyUserFromBranch ( conduit , branch ) : <EOL> emails = branch . get_any_author_emails ( ) <EOL> users = conduit . query_users_from_emails ( emails ) <EOL> for user in users : <EOL> if user : <EOL> return user <EOL> raise abdt_exception . NoUsersOnBranchException ( <EOL> branch . review_branch_name ( ) , branch . base_branch_name ( ) , emails ) </s>
