New submission from Maxim <m.zemsk...@gmail.com>:
Hi! FancyGetopt.generate_help crashes if help text in option_table is None: instance = FancyGetopt([('long', 'l', None)]) help_text = instance.generate_help() TypeError Traceback (most recent call last) <ipython-input-40-04e4e328455e> in <module> ----> 1 a.generate_help() /usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/fancy_getopt.py in generate_help(self, header) 352 (max_opt, opt_names, text[0])) 353 else: --> 354 lines.append(" --%-*s" % opt_names) 355 356 for l in text[1:]: TypeError: * wants int This code is in master branch too. And if help_text is empty string code behavior is like a help_text is actually pass and added 2 whitespaces. ---------- components: Library (Lib) messages: 338401 nosy: crztssr priority: normal severity: normal status: open title: FancyGetopt.generate_help crashes with TypeError type: behavior versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36371> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com