Hello community,

here is the log from the commit of package python-cups for openSUSE:Factory 
checked in at 2012-03-29 07:47:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cups (Old)
 and      /work/SRC/openSUSE:Factory/.python-cups.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cups", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cups/python-cups.changes  2011-11-16 
17:22:23.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-cups.new/python-cups.changes     
2012-03-29 07:47:21.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Mar 28 11:23:39 UTC 2012 - [email protected]
+
+- Update to version 1.9.61:
+  + Several bug fixes, including reference count fixes and better
+    handling of failures from Py* functions.
+
+-------------------------------------------------------------------

Old:
----
  pycups-1.9.60.tar.bz2

New:
----
  pycups-1.9.61.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-cups.spec ++++++
--- /var/tmp/diff_new_pack.GpDwFK/_old  2012-03-29 07:47:23.000000000 +0200
+++ /var/tmp/diff_new_pack.GpDwFK/_new  2012-03-29 07:47:23.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-cups
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,20 +15,19 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-# norootforbuild
-
 
 Name:           python-cups
 %define _name   pycups
-BuildRequires:  cups-devel python-devel
-Version:        1.9.60
-Release:        1
-Group:          Development/Libraries/Python
-License:        GPL-2.0+
+BuildRequires:  cups-devel
+BuildRequires:  python-devel
+Version:        1.9.61
+Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Url:            http://cyberelk.net/tim/software/pycups/
 Source:         http://cyberelk.net/tim/data/pycups/%{_name}-%{version}.tar.bz2
 Summary:        Python Bindings for CUPS
+License:        GPL-2.0+
+Group:          Development/Libraries/Python
 %py_requires
 
 %description

++++++ pycups-1.9.60.tar.bz2 -> pycups-1.9.61.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.60/ChangeLog new/pycups-1.9.61/ChangeLog
--- old/pycups-1.9.60/ChangeLog 2011-10-06 17:37:00.000000000 +0200
+++ new/pycups-1.9.61/ChangeLog 2012-03-06 11:53:09.000000000 +0100
@@ -1,3 +1,43 @@
+2012-03-06  Tim Waugh  <[email protected]>
+
+       * setup.py: Version 1.9.61.
+
+2011-12-08  Tim Waugh  <[email protected]>
+
+       * cupsipp.c (IPPRequest_getAttributes): Hardened for Py*
+       failures.
+
+       * cupsppd.c (PPD_emitString): Fixed some more reference count
+       issues (trac #17).
+
+       * cupsipp.c: Fixed reference count issue with called object
+       result (trac #17).
+       (cupsipp_iocb_read): Prevent NULL dereference when
+       Py_BuildValue fails (trac #17).
+
+2011-12-06  Tim Waugh  <[email protected]>
+
+       * cupsconnection.c, cupsmodule.c, cupsppd.c: Use
+       Py_RETURN_NONE where appropriate.
+
+       * cupsmodule.c, cupsppd.c: Fixed reference count issues with
+       Py_None (trac #17).
+
+2011-11-28  Tim Waugh  <[email protected]>
+
+       * cupsmodule.c: Fixed typo in fix for trac #16.
+
+2011-11-25  Tim Waugh  <[email protected]>
+
+       * cupsmodule.c: HTTP_AUTHORIZATION_CANCELED constant requires
+       CUPS 1.4 (trac #16).
+
+       * cupsppd.c: Object lifecycle debugging.
+
+2011-10-11  Tim Waugh  <[email protected]>
+
+       * setup.py: Version 1.9.60.
+
 2011-10-06  Tim Waugh  <[email protected]>
 
        * cupsmodule.c: New constants defined.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.60/PKG-INFO new/pycups-1.9.61/PKG-INFO
--- old/pycups-1.9.60/PKG-INFO  2011-10-11 17:36:55.000000000 +0200
+++ new/pycups-1.9.61/PKG-INFO  2012-03-06 12:19:34.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: pycups
-Version: 1.9.60
+Version: 1.9.61
 Summary: Python bindings for libcups
 Home-page: http://cyberelk.net/tim/software/pycups/
 Author: Tim Waugh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.60/cupsconnection.c 
new/pycups-1.9.61/cupsconnection.c
--- old/pycups-1.9.60/cupsconnection.c  2011-10-04 17:58:39.000000000 +0200
+++ new/pycups-1.9.61/cupsconnection.c  2011-12-06 18:55:28.000000000 +0100
@@ -488,9 +488,8 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
   debugprintf("<- do_printer_request (None)\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -1712,9 +1711,8 @@
     return NULL;
   }
 
-  Py_INCREF (Py_None);
   debugprintf ("<- Connection_cancelJob() = None\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -1803,9 +1801,8 @@
     return NULL;
   }
 
-  Py_INCREF (Py_None);
   debugprintf ("<- Connection_cancelAllJobs() = None\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -1877,8 +1874,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -1945,9 +1941,8 @@
     return NULL;
   }
 
-  Py_INCREF (Py_None);
   debugprintf ("<- Connection_authenticateJob() = None\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -1992,9 +1987,8 @@
     return NULL;
   }
 
-  Py_INCREF (Py_None);
   debugprintf ("<- Connection_setJobHoldUntil() = None\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2033,9 +2027,8 @@
     return NULL;
   }
 
-  Py_INCREF (Py_None);
   debugprintf ("<- Connection_restartJob() = None\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2083,9 +2076,8 @@
     return NULL;
   }
 
-  Py_INCREF (Py_None);
   debugprintf ("<- Connection_getFile() = None\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2133,9 +2125,8 @@
     return NULL;
   }
 
-  Py_INCREF (Py_None);
   debugprintf ("<- Connection_putFile() = None\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static ipp_t *
@@ -2335,9 +2326,8 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
   debugprintf ("<- Connection_addPrinter() = None\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2384,8 +2374,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2441,8 +2430,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2498,8 +2486,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2547,8 +2534,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2616,8 +2602,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2673,8 +2658,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2730,8 +2714,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2810,8 +2793,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2924,8 +2906,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -2988,8 +2969,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -3291,8 +3271,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -3403,8 +3382,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -3440,8 +3418,7 @@
   }
 
   ippDelete (answer);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -3821,9 +3798,8 @@
     return NULL;
   }
   fclose (tf);
-  Py_INCREF (Py_None);
   debugprintf ("<- Connection_adminExportSamba()\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -3900,9 +3876,8 @@
   }
 
   cupsFreeOptions (num_settings, settings);
-  Py_INCREF (Py_None);
   debugprintf ("<- Connection_adminSetServerSettings()\n");
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -4317,8 +4292,7 @@
 
   ippDelete (answer);
   debugprintf ("<- Connection_renewSubscription()\n");
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -4353,8 +4327,7 @@
 
   ippDelete (answer);
   debugprintf ("<- Connection_cancelSubscription()\n");
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -5364,8 +5337,7 @@
   if (self->instance)
     return PyString_FromString (self->instance);
 
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.60/cupsipp.c new/pycups-1.9.61/cupsipp.c
--- old/pycups-1.9.60/cupsipp.c 2010-04-26 10:36:22.000000000 +0200
+++ new/pycups-1.9.61/cupsipp.c 2012-03-06 11:51:17.000000000 +0100
@@ -1,6 +1,6 @@
 /*
  * cups - Python bindings for CUPS
- * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010  Red Hat, Inc.
+ * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011  Red Hat, Inc.
  * Author: Tim Waugh <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -311,6 +311,12 @@
   char *gotbuffer;
 
   debugprintf ("-> cupsipp_iocb_read\n");
+
+  if (!args) {
+    debugprintf ("Py_BuildValue failed\n");
+    goto out;
+  }
+
   result = PyEval_CallObject (callable, args);
   Py_DECREF (args);
 
@@ -331,6 +337,8 @@
     debugprintf ("Unknown result object type!\n");
   }
 
+  Py_DECREF (result);
+
  out:
   debugprintf ("<- cupsipp_iocb_read() == %zd\n", got);
   return got;
@@ -364,10 +372,10 @@
   ipp_attribute_t *attr;
   for (attr = self->ipp->attrs; attr; attr = attr->next)
     {
-      PyObject *largs;
-      PyObject *lkwlist;
-      PyObject *values;
-      IPPAttribute *attribute;
+      PyObject *largs = NULL;
+      PyObject *lkwlist = NULL;
+      PyObject *values = NULL;
+      IPPAttribute *attribute = NULL;
 
       debugprintf ("%s: ", attr->name);
       if (attr->value_tag == IPP_TAG_ZERO ||
@@ -375,12 +383,15 @@
          attr->value_tag == IPP_TAG_NOTSETTABLE ||
          attr->value_tag == IPP_TAG_ADMINDEFINE) {
        debugprintf ("no value\n");
-       values = NULL;
       } else {
        PyObject *value = NULL;
        int i;
+       int unknown_value_tag = 0;
 
        values = PyList_New (0);
+       if (!values)
+         goto fail_add;
+
        for (i = 0; i < attr->num_values; i++) {
          switch (attr->value_tag) {
          case IPP_TAG_INTEGER:
@@ -414,23 +425,34 @@
 
          default:
            value = NULL;
+           unknown_value_tag = 1;
            debugprintf ("Unable to encode value tag %d\n", attr->value_tag);
          }
 
          if (!value)
-           break;
+           break; /* out of values loop */
 
          debugprintf ("(%p), ", value);
-         PyList_Append (values, value);
+         if (PyList_Append (values, value) != 0) {
+           Py_DECREF (values);
+           Py_DECREF (value);
+           goto fail_add;
+         }
+
          Py_DECREF (value);
        }
 
-       if (!value) {
+       if (unknown_value_tag) {
          Py_DECREF (values);
-         values = NULL;
+
+         /* Next attribute */
          continue;
        }
 
+       if (!value)
+         /* Failed to build object */
+         goto fail_add;
+
        debugprintf ("\n");
       }
 
@@ -441,22 +463,56 @@
                               attr->name,
                               values);
        Py_DECREF (values);
+       values = NULL;
       } else
        largs = Py_BuildValue ("(iis)", attr->group_tag, attr->value_tag,
                               attr->name ? attr->name : "");
 
+      if (!largs)
+       goto fail_add;
+
       lkwlist = Py_BuildValue ("{}");
+      if (!lkwlist)
+       goto fail_add;
+
       attribute = (IPPAttribute *) PyType_GenericNew (&cups_IPPAttributeType,
                                                      largs, lkwlist);
-      if (IPPAttribute_init (attribute, largs, lkwlist) == 0)
-       PyList_Append (attrs, (PyObject *) attribute);
+      if (!attribute)
+       goto fail_add;
+
+      if (IPPAttribute_init (attribute, largs, lkwlist) != 0)
+       goto fail_add;
+
+      if (PyList_Append (attrs, (PyObject *) attribute) != 0)
+       goto fail_add;
 
       Py_DECREF (largs);
       Py_DECREF (lkwlist);
       Py_DECREF (attribute);
+      continue;
+
+    fail_add:
+      if (values)
+       Py_DECREF (values);
+
+      if (largs)
+       Py_DECREF (largs);
+
+      if (lkwlist)
+       Py_DECREF (lkwlist);
+
+      if (attribute)
+       Py_DECREF (attribute);
+
+      debugprintf ("\nException creating new object\n");
+      goto fail_out;
     }
 
   return attrs;
+
+ fail_out:
+  Py_DECREF (attrs);
+  return NULL;
 }
 
 PyGetSetDef IPPRequest_getseters[] =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.60/cupsmodule.c 
new/pycups-1.9.61/cupsmodule.c
--- old/pycups-1.9.60/cupsmodule.c      2011-10-06 17:36:38.000000000 +0200
+++ new/pycups-1.9.61/cupsmodule.c      2011-12-06 18:55:28.000000000 +0100
@@ -262,8 +262,7 @@
     return NULL;
 
   cupsSetUser (user);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -275,8 +274,7 @@
     return NULL;
 
   cupsSetServer (server);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -288,8 +286,7 @@
     return NULL;
 
   ippSetPort (port);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -300,8 +297,7 @@
     return NULL;
 
   cupsSetEncryption (e);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -359,8 +355,7 @@
 #endif
 
   debugprintf ("<- cups_setPasswordCB\n");
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 #ifdef HAVE_CUPS_1_4
@@ -404,8 +399,7 @@
   }
 
   debugprintf ("<- cups_setPasswordCB2\n");
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 #endif /* HAVE_CUPS_1_4 */
 
@@ -417,8 +411,7 @@
     return NULL;
 
   ppdSetConformance (level);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -457,7 +450,7 @@
     nreq = strtoul (preq, &end, 0);
   }
 
-  return Py_None;
+  Py_RETURN_NONE;
 fail:
   PyErr_SetString (PyExc_RuntimeError, "I am version " VERSION);
   return NULL;
@@ -692,7 +685,9 @@
   INT_CONSTANT (HTTP_SERVICE_UNAVAILABLE);
   INT_CONSTANT (HTTP_GATEWAY_TIMEOUT);
   INT_CONSTANT (HTTP_NOT_SUPPORTED);
+#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR 
>= 4)
   INT_CONSTANT (HTTP_AUTHORIZATION_CANCELED);
+#endif /* CUPS 1.4 */
 #if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR 
>= 5)
   INT_CONSTANT (HTTP_PKI_ERROR);
 #endif /* CUPS 1.5 */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.60/cupsppd.c new/pycups-1.9.61/cupsppd.c
--- old/pycups-1.9.60/cupsppd.c 2011-06-27 11:16:20.000000000 +0200
+++ new/pycups-1.9.61/cupsppd.c 2011-12-08 14:22:35.000000000 +0100
@@ -220,6 +220,7 @@
     return -1;
   }
 
+  debugprintf ("+ PPD %p %s (fd %d)\n", self, filename, fileno (self->file));
   self->ppd = ppdOpenFile (filename);
   if (!self->ppd) {
     fclose (self->file);
@@ -235,6 +236,8 @@
 static void
 PPD_dealloc (PPD *self)
 {
+  debugprintf ("- PPD %p (fd %d)\n", self, fileno (self->file));
+
   if (self->file)
     fclose (self->file);
   if (self->ppd)
@@ -255,7 +258,7 @@
 PPD_localize (PPD *self)
 {
   if (!ppdLocalize (self->ppd))
-    return Py_None;
+    Py_RETURN_NONE;
   return PyErr_SetFromErrno (PyExc_RuntimeError);
 }
 
@@ -319,8 +322,7 @@
 PPD_markDefaults (PPD *self)
 {
   ppdMarkDefaults (self->ppd);
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 static PyObject *
@@ -549,11 +551,10 @@
     ret = PyString_FromString(emitted);
     free (emitted);
   } else {
+    Py_INCREF (Py_None);
     ret = Py_None;
   }
 
-  Py_INCREF (ret);
-
   return ret;
 }
 
@@ -576,7 +577,7 @@
     return NULL;
 
   if (!ppdEmit(self->ppd, f, section))
-    return Py_None;
+    Py_RETURN_NONE;
   return PyErr_SetFromErrno (PyExc_RuntimeError);
 }
 
@@ -601,7 +602,7 @@
     return NULL;
 
   if (!ppdEmitAfterOrder(self->ppd, f, section, limit, min_order))
-    return Py_None;
+    Py_RETURN_NONE;
   return PyErr_SetFromErrno (PyExc_RuntimeError);
 }
 
@@ -619,7 +620,7 @@
     return NULL;
 
   if (!ppdEmitFd(self->ppd, f, section))
-    return Py_None;
+    Py_RETURN_NONE;
   return PyErr_SetFromErrno (PyExc_RuntimeError);
 }
 
@@ -644,7 +645,7 @@
     return NULL;
 
   if (!ppdEmitJCL(self->ppd, f, job_id, user, title))
-    return Py_None;
+    Py_RETURN_NONE;
   return PyErr_SetFromErrno (PyExc_RuntimeError);
 }
 
@@ -666,7 +667,7 @@
     return NULL;
 
   if (!ppdEmitJCLEnd(self->ppd, f))
-    return Py_None;
+    Py_RETURN_NONE;
   return PyErr_SetFromErrno (PyExc_RuntimeError);
 }
 
@@ -736,8 +737,7 @@
   if (line)
     free (line);
 
-  Py_INCREF (Py_None);
-  return Py_None;
+  Py_RETURN_NONE;
 }
 
 /////////
@@ -1080,8 +1080,7 @@
 Option_getKeyword (Option *self, void *closure)
 {
   if (!self->option) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->option->keyword);
@@ -1091,8 +1090,7 @@
 Option_getDefchoice (Option *self, void *closure)
 {
   if (!self->option) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->option->defchoice);
@@ -1102,8 +1100,7 @@
 Option_getText (Option *self, void *closure)
 {
   if (!self->option) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->option->text);
@@ -1113,8 +1110,7 @@
 Option_getUI (Option *self, void *closure)
 {
   if (!self->option) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return PyInt_FromLong (self->option->ui);
@@ -1312,8 +1308,7 @@
 Group_getText (Group *self, void *closure)
 {
   if (!self->group) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->group->text);
@@ -1323,8 +1318,7 @@
 Group_getName (Group *self, void *closure)
 {
   if (!self->group) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->group->name);
@@ -1500,8 +1494,7 @@
 Constraint_getOption1 (Constraint *self, void *closure)
 {
   if (!self->constraint) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->constraint->option1);
@@ -1511,8 +1504,7 @@
 Constraint_getChoice1 (Constraint *self, void *closure)
 {
   if (!self->constraint) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->constraint->choice1);
@@ -1522,8 +1514,7 @@
 Constraint_getOption2 (Constraint *self, void *closure)
 {
   if (!self->constraint) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->constraint->option2);
@@ -1533,8 +1524,7 @@
 Constraint_getChoice2 (Constraint *self, void *closure)
 {
   if (!self->constraint) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->constraint->choice2);
@@ -1662,8 +1652,7 @@
 Attribute_getName (Attribute *self, void *closure)
 {
   if (!self->attribute) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->attribute->name);
@@ -1673,8 +1662,7 @@
 Attribute_getSpec (Attribute *self, void *closure)
 {
   if (!self->attribute) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->attribute->spec);
@@ -1684,8 +1672,7 @@
 Attribute_getText (Attribute *self, void *closure)
 {
   if (!self->attribute) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->attribute->text);
@@ -1695,8 +1682,7 @@
 Attribute_getValue (Attribute *self, void *closure)
 {
   if (!self->attribute) {
-    Py_INCREF (Py_None);
-    return Py_None;
+    Py_RETURN_NONE;
   }
 
   return make_PyUnicode_from_ppd_string (self->ppd, self->attribute->value);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.60/setup.py new/pycups-1.9.61/setup.py
--- old/pycups-1.9.60/setup.py  2011-10-11 17:28:53.000000000 +0200
+++ new/pycups-1.9.61/setup.py  2012-03-06 11:52:49.000000000 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 
-## Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011  Red Hat, Inc
+## Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012  Red 
Hat, Inc
 ##  Author: Tim Waugh <[email protected]>
 
 ## This program is free software; you can redistribute it and/or modify
@@ -35,7 +35,7 @@
 
 from distutils.core import setup, Extension
 import sys
-VERSION="1.9.60"
+VERSION="1.9.61"
 libraries=["cups"]
 
 if sys.platform == "darwin":

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to