[issue24488] ConfigParser.getboolean fails on boolean options
New submission from Andreas Hilboll: Not sure if this is by design (or if I'm doing something utterly stupid), but I often create a ConfigParser object for my application and then pass this around (or make it global). So when I do something like cfg.set("input_filter", "include_filtered", True) and then cfg.getboolean("input_filter", "include_filtered") I receive an error (AttributeError: 'bool' object has no attribute 'lower'). Wouldn't it be more sensible if getboolean would return the raw value in case the raw value is already a boolean? If not, which would be the best way forward for me? -- components: Library (Lib) messages: 245638 nosy: andreas-h priority: normal severity: normal status: open title: ConfigParser.getboolean fails on boolean options versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue24488> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19214] shutil.make_archive should recognize extensions in filenames
New submission from Andreas Hilboll: shutil.make_archive should be able to automatically determine the desired *format* from the given filename. It would make life easier, because the programmer wouldn't need to strip the extension from the filename before passing it to make_archive. I'm think of something along the lines of if base_path.lower().endswith(".zip"): fmt = "zip" base_path = base_path[:-4] elif base_path.lower().endswith(".tar.gz") or base_path.lower().endswith(".tgz"): fmt = "gztar" base_path = base_path[:-7] elif base_path.lower().endswith(".tar.bz2"): fmt = "bztar" base_path = base_path[:-8] elif base_path.lower().endswith(".tar"): fmt = "tar" base_path = base_path[:-4] -- messages: 199373 nosy: andreas-h priority: normal severity: normal status: open title: shutil.make_archive should recognize extensions in filenames type: enhancement versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue19214> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com