Fix tweet.py
This commit is contained in:
parent
8fcfe72f5b
commit
0a8a69875c
17
tweet.py
17
tweet.py
|
@ -18,13 +18,14 @@ if __name__ == "__main__":
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
if isinstance(args.reply, int):
|
if args.reply:
|
||||||
reply = args.reply
|
if isinstance(args.reply, int):
|
||||||
else:
|
reply = args.reply
|
||||||
try:
|
else:
|
||||||
if "twitter.com" in args.reply and "status" in args.reply:
|
try:
|
||||||
reply = int(args.reply.split('/')[-1])
|
if "twitter.com" in args.reply and "status" in args.reply:
|
||||||
except:
|
reply = int(args.reply.split('/')[-1])
|
||||||
raise ValueError("Invalid tweet ID passed for -r.")
|
except:
|
||||||
|
raise ValueError("Invalid tweet ID passed for -r.")
|
||||||
|
|
||||||
two.tweet(text, reply)
|
two.tweet(text, reply)
|
||||||
|
|
Loading…
Reference in a new issue