#NEWLINE# def connect_or_error( host , token ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# connection = _connect ( host , token ) #NEWLINE# if ( not connection ) : #NEWLINE# #INDENT# raise HTTPError ( http . SERVICE_UNAVAILABLE ) #NEWLINE# #UNINDENT# return connection #NEWLINE# #UNINDENT# except UnauthorizedError : #NEWLINE# #INDENT# raise HTTPError ( http . UNAUTHORIZED )