This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bpqpng
Recipients bpqpng
Date 2014-04-23.16:57:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398272240.06.0.678669968331.issue21336@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import ntpath
>>> ntpath.splitdrive(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\python3\lib\ntpath.py", line 159, in splitdrive
    if p and len(p) > 1:
TypeError: object of type 'NoneType' has no len()

Solution: (that I've found)

Lib/ntpath.py
#in function splitdrive
...
    empty = _get_empty(p)
+++ if p and len(p) > 1:
--- if len(p) > 1:
        sep = _get_sep(p)
...
            return p[:2], p[2:]
+++ else:
+++     p = ''
    return empty, p
...
History
Date User Action Args
2014-04-23 16:57:20bpqpngsetrecipients: + bpqpng
2014-04-23 16:57:20bpqpngsetmessageid: <1398272240.06.0.678669968331.issue21336@psf.upfronthosting.co.za>
2014-04-23 16:57:20bpqpnglinkissue21336 messages
2014-04-23 16:57:19bpqpngcreate