Commit 0a8a6987 authored by Klaus-Uwe Mitterer's avatar Klaus-Uwe Mitterer

Fix tweet.py

parent 8fcfe72f
......@@ -18,13 +18,14 @@ if __name__ == "__main__":
except KeyboardInterrupt:
exit(0)
if isinstance(args.reply, int):
reply = args.reply
else:
try:
if "twitter.com" in args.reply and "status" in args.reply:
reply = int(args.reply.split('/')[-1])
except:
raise ValueError("Invalid tweet ID passed for -r.")
if args.reply:
if isinstance(args.reply, int):
reply = args.reply
else:
try:
if "twitter.com" in args.reply and "status" in args.reply:
reply = int(args.reply.split('/')[-1])
except:
raise ValueError("Invalid tweet ID passed for -r.")
two.tweet(text, reply)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment