tehmaze/ipcalc — Issue #7: __init__ does not gracefully handle getting NoneType via eq
Author: ecnivny
Created: 2012-02-17 18:00:35+00:00
State: open

Probably should return a ValueError, or some such when __init__ is passed None?

```Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ipcalc import *
>>> ip = IP(u'10.157.199.130/25')
>>> ip in [ None ]
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/ipcalc.py", line 351, in __eq__
return long(self) == long(IP(other))
File "/Library/Python/2.7/site-packages/ipcalc.py", line 156, in __init__
if '/' in ip:
TypeError: argument of type 'NoneType' is not iterable```