#NEWLINE# def whoami( hostname = MYHOSTNAME ) : #NEWLINE# #INDENT# 'Given a hostname return the Romeo object' #NEWLINE# try : #NEWLINE# #INDENT# for host in foundation . RomeoKeyValue . search ( 'HOSTNAME' , value = hostname ) : #NEWLINE# #INDENT# for ancestor in host . ANCESTORS : #NEWLINE# #INDENT# if ( ancestor . KEY != 'SERVER' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# return ancestor #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except IndexError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# raise IdentityCrisis ( 'you appear to be having an identity crisis' )