#NEWLINE# def findUser( g , githubUser , quiet = False ) : #NEWLINE# #INDENT# 'wraps the get_user method of the Github object' #NEWLINE# addPyGithubToPath ( ) #NEWLINE# from github import GithubException #NEWLINE# try : #NEWLINE# #INDENT# user = g . get_user ( githubUser ) #NEWLINE# if ( user == None ) : #NEWLINE# #INDENT# if ( not quiet ) : #NEWLINE# #INDENT# print ( 'No such github user: ' , githubUser ) #NEWLINE# #UNINDENT# return False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not quiet ) : #NEWLINE# #INDENT# print ( ( ( ' githubUser: ' + user . login ) + '...' ) , end = '' ) #NEWLINE# #UNINDENT# return user #NEWLINE# #UNINDENT# #UNINDENT# except GithubException as e : #NEWLINE# #INDENT# print ( e ) #NEWLINE# if ( not quiet ) : #NEWLINE# #INDENT# print ( 'No such github user: ' , githubUser ) #NEWLINE# #UNINDENT# return False