render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
43fe83
From 3abbed1a7393b4e59152bda1b37f67b8c440f5b6 Mon Sep 17 00:00:00 2001
43fe83
Message-Id: <3abbed1a7393b4e59152bda1b37f67b8c440f5b6.1378475168.git.jdenemar@redhat.com>
43fe83
From: Guan Qiang <hzguanqiang@corp.netease.com>
43fe83
Date: Wed, 4 Sep 2013 13:09:49 -0600
43fe83
Subject: [PATCH] python: Fix a PyList usage mistake
43fe83
43fe83
7.0: https://bugzilla.redhat.com/show_bug.cgi?id=1002558
43fe83
43fe83
Fix PyList usage mistake in Function libvirt_lxc_virDomainLxcOpenNamespace.
43fe83
43fe83
https://bugzilla.redhat.com/show_bug.cgi?id=1002383
43fe83
43fe83
Signed-off-by: Eric Blake <eblake@redhat.com>
43fe83
(cherry picked from commit c26181495f3c98870d0794052246718f5d3d8dd6)
43fe83
---
43fe83
 python/libvirt-lxc-override.c | 2 +-
43fe83
 1 file changed, 1 insertion(+), 1 deletion(-)
43fe83
43fe83
diff --git a/python/libvirt-lxc-override.c b/python/libvirt-lxc-override.c
43fe83
index 03bf2df..f76ff4b 100644
43fe83
--- a/python/libvirt-lxc-override.c
43fe83
+++ b/python/libvirt-lxc-override.c
43fe83
@@ -80,7 +80,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED,
43fe83
     if (c_retval < 0)
43fe83
         return VIR_PY_NONE;
43fe83
 
43fe83
-    py_retval = PyList_New(c_retval);
43fe83
+    py_retval = PyList_New(0);
43fe83
     for (i = 0; i < c_retval; i++) {
43fe83
         PyObject *item = NULL;
43fe83
 
43fe83
-- 
43fe83
1.8.3.2
43fe83