From e2f89a5d2b172f706ece54024758cca2ef380dcb Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Mon, 19 Aug 2019 21:01:50 +0200 Subject: [PATCH] Fix show with no argument (used after post) --- jan-pona-mute.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jan-pona-mute.py b/jan-pona-mute.py index 21f7fd2..9885850 100755 --- a/jan-pona-mute.py +++ b/jan-pona-mute.py @@ -340,6 +340,7 @@ post again.""" if line == "" and self.post == None: print("Please specify a number.") return + n = 0 if line != "": try: n = int(line.strip()) @@ -364,7 +365,10 @@ post again.""" return print() - print(self.header("%2d. %s %s") % (n, self.post.data()["created_at"], self.post.author())) + if n: + print(self.header("%2d. %s %s") % (n, self.post.data()["created_at"], self.post.author())) + else: + print(self.header("%s %s") % (self.post.data()["created_at"], self.post.author())) print() self.show(self.post) print() -- 2.25.1