#NEWLINE# def find_database( databases ) : #NEWLINE# #INDENT# home = environ [ 'HOME' ] #NEWLINE# databases = [ ( home + x ) for x in databases ] #NEWLINE# for db in databases : #NEWLINE# #INDENT# logger . debug ( 'testing for db %s' , db ) #NEWLINE# if path . exists ( db ) : #NEWLINE# #INDENT# logger . info ( 'found db %s' , db ) #NEWLINE# return db #NEWLINE# #UNINDENT# #UNINDENT# raise IOError ( ( 'cannot find OmnifocusDatabase in ' + databases ) )