def avatarInCache(str_ = ''): if os.path.isfile(Path.tempAvatar(str_)) : return True, Path.tempAvatar(str_) elif os.path.isfile(Path.avatar(str_)) : return True, Path.avatar(str_) return False, ''