[Python-modules-commits] r6681 - in packages/pcapy/trunk/debian (2 files)

arnau at users.alioth.debian.org arnau at users.alioth.debian.org
Sun Oct 12 18:03:48 UTC 2008


    Date: Sunday, October 12, 2008 @ 18:03:47
  Author: arnau
Revision: 6681

Improve 02_remove_exception_on_next.patch

Modified:
  packages/pcapy/trunk/debian/changelog
  packages/pcapy/trunk/debian/patches/02_remove_exception_on_next.patch

Modified: packages/pcapy/trunk/debian/changelog
===================================================================
--- packages/pcapy/trunk/debian/changelog	2008-10-12 15:40:05 UTC (rev 6680)
+++ packages/pcapy/trunk/debian/changelog	2008-10-12 18:03:47 UTC (rev 6681)
@@ -1,7 +1,7 @@
 pcapy (0.10.5-3) UNRELEASED; urgency=low
 
-  * Add 02_remove_exception_on_next.patch which returns None instead of
-    raising an exception when pcap_next() returns NULL. Closes: #500041.
+  * Add 02_remove_exception_on_next.patch, next() now returns None instead
+    of raising an exception when pcap_next() returns NULL. Closes: #500041.
 
  -- Arnaud Fontaine <arnau at debian.org>  Sun, 12 Oct 2008 16:26:38 +0100
 

Modified: packages/pcapy/trunk/debian/patches/02_remove_exception_on_next.patch
===================================================================
--- packages/pcapy/trunk/debian/patches/02_remove_exception_on_next.patch	2008-10-12 15:40:05 UTC (rev 6680)
+++ packages/pcapy/trunk/debian/patches/02_remove_exception_on_next.patch	2008-10-12 18:03:47 UTC (rev 6681)
@@ -1,17 +1,16 @@
---- pcapy-0.10.5.orig/pcapobj.cc	2008-10-12 16:17:31.000000000 +0100
-+++ pcapy-0.10.5/pcapobj.cc	2008-10-12 15:55:24.000000000 +0100
-@@ -208,10 +208,10 @@
-   Py_END_ALLOW_THREADS;
+--- pcapy-0.10.5.orig/pcapobj.cc	2008-10-12 19:00:52.000000000 +0100
++++ pcapy-0.10.5/pcapobj.cc	2008-10-12 18:59:31.000000000 +0100
+@@ -209,8 +209,11 @@
  
    if(!buf)
--    {
+     {
 -      PyErr_SetString(PcapError, pcap_geterr(pp->pcap));
 -      return NULL;
--    }
-+    // According to Pcap manpage, there is no way to determine whether
-+    // an error occured or not when calling pcap_next, so just returns
-+    // None
-+    return Py_None;
++      // According to Pcap manpage, there is no way to determine whether
++      // an error occured or not when calling pcap_next, so just returns
++      // None
++      Py_INCREF(Py_None);
++      Py_None;
+     }
  
    PyObject *pkthdr = new_pcap_pkthdr(&hdr);
- 




More information about the Python-modules-commits mailing list