#NEWLINE# @ staticmethod #NEWLINE# def newClient( type_ , url , branch = None ) : #NEWLINE# #INDENT# assert ( type_ in ( 'git' , 'svn' , 'hg' ) ) #NEWLINE# if ( 'github.com/' in url ) : #NEWLINE# #INDENT# type_ = 'github' #NEWLINE# #UNINDENT# if ( 'developer.mbed.org' in url ) : #NEWLINE# #INDENT# type_ = 'mbed' #NEWLINE# #UNINDENT# if ( 'bitbucket.org' in url ) : #NEWLINE# #INDENT# type_ = 'bitbucket' #NEWLINE# #UNINDENT# clsname = ( '%sClient' % type_ . title ( ) ) #NEWLINE# obj = getattr ( modules [ __name__ ] , clsname ) ( url , branch ) #NEWLINE# assert isinstance ( obj , BaseClient ) #NEWLINE# return obj