def getContactPhotos(): Logger().debug("Contact : %s" % OPT.user_id) try: ret, count = flickr_download_helper.main() if ret: if ret == 4: # failed to find user, maybe next time! pass else: Logger().error("getting %s failed (1: %s)" % (OPT.user_id, ret)) if OPT.smart and not count: if INS['failure_level'] == 0: Logger().info("stopping there, the most recent user to " \ "upload didn't upload anything (%s)" % OPT.user_id) return False INS['failure_level'] -= 1 except Exception, e: Logger().print_tb(e) err_msg = "(4: %s)" % str(e) if getattr(e, 'strerror', None): err_msg = "(2: %s)" % e.strerror elif getattr(e, 'message', None): err_msg = "(3: %s)" % e.message Logger().error("getting %s failed %s" % (OPT.user_id, err_msg))