for dir in [ '/usr/share' ] :
for suffix in ['png','jpg']:
attempt=os.path.join(dir,'images',"%s.%s"%(filename,suffix))
- if os.path.is_file(attempt) : return attempt
+ if os.path.isfile(attempt) : return attempt
return os.path.join('/could/not/locate/image/file',filename)