#NEWLINE# def createRepoForOrg( org , labNumber , githubUserObject , githubTeamObject , firstName , lastName , githubid , csil ) : #NEWLINE# #INDENT# addPyGithubToPath ( ) #NEWLINE# from github import GithubException #NEWLINE# desc = formatRepoDesc ( labNumber , firstName , lastName ) #NEWLINE# repoName = ( ( labNumber + '_' ) + githubid ) #NEWLINE# try : #NEWLINE# #INDENT# repo = org . create_repo ( repoName , desc , ( 'http://www.cs.ucsb.edu/~' + csil ) , True , True , True , True , team_id = githubTeamObject , auto_init = True , gitignore_template = 'Java' ) #NEWLINE# print ( ( ' Created repo ' + repoName ) ) #NEWLINE# return True #NEWLINE# #UNINDENT# except GithubException as e : #NEWLINE# #INDENT# if ( ( 'errors' in e . data ) and ( 'message' in e . data [ 'errors' ] [ 0 ] ) and ( e . data [ 'errors' ] [ 0 ] [ 'message' ] == 'name already exists on this account' ) ) : #NEWLINE# #INDENT# print ( ' repo {0} already exists' . format ( repoName ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( e ) #NEWLINE# #UNINDENT# #UNINDENT# return False