X-Git-Url: https://jfr.im/git/z_archive/twitter.git/blobdiff_plain/84c699d25345997979af67b97c6cfccd851945ed..7fe9aab661b649adc5023afdc648414b53b23319:/twitter/follow.py diff --git a/twitter/follow.py b/twitter/follow.py index 7dddbd1..39e4ce8 100644 --- a/twitter/follow.py +++ b/twitter/follow.py @@ -237,9 +237,16 @@ def main(args=sys.argv[1:]): for uid in user_ids: if options['show_id']: - print(str(uid) + "\t" + users[uid].encode("utf-8")) + try: + print(str(uid) + "\t" + users[uid].encode("utf-8")) + except KeyError: + pass + else: - print(users[uid].encode("utf-8")) + try: + print(users[uid].encode("utf-8")) + except KeyError: + pass # print total on stderr to separate from user list on stdout if options['followers']: