]> git.sesse.net Git - vlc/commitdiff
python/vlcglue.c : Clear the exception when vlc.MediaControl is instanciated with...
authorOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Fri, 9 Dec 2005 13:12:14 +0000 (13:12 +0000)
committerOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Fri, 9 Dec 2005 13:12:14 +0000 (13:12 +0000)
bindings/python/vlcglue.c

index 87283b1b5c5926d7be83075f55dc1127903b556f..874e92e672a996650127d1d60a7f0102f605b4ec 100644 (file)
@@ -2,7 +2,7 @@
  * vlcglue.c: VLC Module
  *****************************************************************************
  * Copyright (C) 1998-2004 the VideoLAN team
- * $Id: vlc.c 12667 2005-09-25 10:19:26Z zorglub $
+ * $Id$
  *
  * Authors: Olivier Aubert <oaubert at bat710.univ-lyon1.fr>
  *          ClĂ©ment Stenac <zorglub@videolan.org>
@@ -777,6 +777,12 @@ static PyObject *MediaControl_new(PyTypeObject *type, PyObject *args, PyObject *
         ppsz_args[i_size] = NULL;
         Py_DECREF(py_list);
     }
+    else
+    {
+        /* No arguments were given. Clear the exception raised
+        * by PyArg_ParseTuple. */
+        PyErr_Clear();
+    }
 
     Py_BEGIN_ALLOW_THREADS
     MC_TRY;