New submission from Thomas Scrace:
Currently os.path.join will raise an AttributeError if passed an argument that
does not have an endswith() method.
A try/except around the offending line would let us raise a more helpful
TypeError:
except AttributeError as e:
bad = e.args[0].split()[0]
raise TypeError("object of type {} is not valid as a path"
"component".format(type(bad)))
----------
components: Library (Lib)
messages: 181762
nosy: terry.reedy, thomas.scrace
priority: normal
severity: normal
status: open
title: Posix os.path.join should raise TypeError when passed unusable type
type: enhancement
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17174>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com