Thanks for the report Michael.  I've opened bug #10474 for this 
(http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10474) and 
assigned it to the 2.0 Alpha 2 release for the time being.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord
Sent: Friday, May 18, 2007 11:15 AM
To: Discussion of IronPython
Subject: [IronPython] None in sys.path

Hello all,

Weird pseudo-bug in IronPython 1.1.  If you accidentally (!) None into
sys.path then a failed import will raise a TypeError rather than an
ImportError:

 >>> import sys
 >>> sys.path.append(None)
 >>> import wibble
Traceback (most recent call last):
  File , line 0, in <stdin>##81
  File , line 0, in __import__##4
  File mscorlib, line unknown, in Combine
TypeError: Value cannot be null.
Parameter name: path1
 >>>

CPython is resilient against this, ignoring the entry. Maybe this isn't
exactly a *bug* in IronPython - but it was the cause of a problem that
took us a while to find... :-)

Michael Foord
http://www.voidspace.org.uk/ironpython/index.shtml
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to