From e0aab10144fa819166e67746a964b6fe4a0ec406 Mon Sep 17 00:00:00 2001 From: Delio Brignoli Date: Fri, 16 Oct 2015 21:25:02 +0200 Subject: [PATCH] argparse: Do not print a blank line when description is empty. --- argparse/argparse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/argparse/argparse.py b/argparse/argparse.py index 5cef4939..977f5522 100644 --- a/argparse/argparse.py +++ b/argparse/argparse.py @@ -126,7 +126,8 @@ class ArgumentParser: # print full information print() - print(self.description) + if self.description: + print(self.description) if self.pos: print("\npositional args:") for pos in self.pos: