diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2016-02-01 19:05:26 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2016-02-01 23:54:58 +0100 |
commit | 52e4c3086c12b460541e53d74e54abf6d6b3fe65 (patch) | |
tree | 5dc20c5265c08d76cac6ea72bcb71a853d44b484 | |
parent | 74fb3c5ecc2e1464d6d3bf6408e11a44d2821f8e (diff) | |
download | clufter-52e4c3086c12b460541e53d74e54abf6d6b3fe65.tar.gz clufter-52e4c3086c12b460541e53d74e54abf6d6b3fe65.tar.xz clufter-52e4c3086c12b460541e53d74e54abf6d6b3fe65.zip |
main: better support for short/long "report bugs" link
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r-- | main.py | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -31,7 +31,10 @@ try: except ImportError: report_bugs = () else: - report_bugs = ("Report bugs to <{0}>.".format(REPORT_BUGS), ) + report_bugs = ("Report bugs to", "<{0}>".format(REPORT_BUGS)) + joint = ' '.join(report_bugs) + '.' + if len(joint) < 70: + report_bugs = (joint, ) _system = system().lower() @@ -234,8 +237,10 @@ class SharedOptionParser(OptionParser): + (self.description_raw and '\n' + self.description_raw + '\n') def format_epilog(self, formatter): - return ''.join(formatter.format_epilog(l) - for l in self.epilog.split('\n')) + ret = '\n' + '\n'.join(formatter.format_epilog(l).strip('\n') + if '<http' not in l else l + for l in self.epilog.split('\n')) + return ret # custom methods |