Package: python2.3-ipy Version: 0.42-3 Severity: normal Tags: patch With IPy, one can't create a IP object from string '0.0.0.0/0.0.0.0', while '0.0.0.0/0' works.
Here is a transcript, tested with python2.3-ipy from testing: In [3]: n = IP('0.0.0.0/0.0.0.0') --------------------------------------------------------------------------- exceptions.KeyboardInterrupt Traceback (most recent call last) Python waits forever in IP() call. Normal behaviour should be: In [2]: n = IP('0.0.0.0/0.0.0.0') In [3]: print n 0.0.0.0/0 Attached patch fixes the issue. -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.15-1-k7 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages python2.3-ipy depends on: ii python2.3 2.3.5-3sarge1 An interactive high-level object-o -- no debconf information
--- IPy.py.old 2006-01-10 15:03:35.000000000 +0100 +++ IPy.py 2006-01-10 15:03:56.000000000 +0100 @@ -1207,7 +1207,7 @@ bits = masklen # remove zero bits at the end - while (num & 1) == 0: + while (num & 1) == 0 and bits != 0: num = num >> 1 bits -= 1 if bits == 0: