diff --git a/bindings/python/src/PyXRootDFileSystem.cc b/bindings/python/src/PyXRootDFileSystem.cc index d53fbd7fc65..ceb2c01f7a6 100644 --- a/bindings/python/src/PyXRootDFileSystem.cc +++ b/bindings/python/src/PyXRootDFileSystem.cc @@ -608,15 +608,15 @@ namespace PyXRootD { static const char *kwlist[] = { "files", "flags", "priority", "timeout", "callback", NULL }; - XrdCl::PrepareFlags::Flags flags; + uint16_t flagval = 0; uint8_t priority = 0; uint16_t timeout = 0; PyObject *pyfiles = NULL, *callback = NULL; PyObject *pyresponse = NULL, *pystatus = NULL; XrdCl::XRootDStatus status; - if ( !PyArg_ParseTupleAndKeywords( args, kwds, "OK|bHO:prepare", - (char**) kwlist, &pyfiles, &flags, &priority, &timeout, &callback ) ) + if ( !PyArg_ParseTupleAndKeywords( args, kwds, "OH|bHO:prepare", + (char**) kwlist, &pyfiles, &flagval, &priority, &timeout, &callback ) ) return NULL; if ( !PyList_Check( pyfiles ) ) { @@ -636,6 +636,9 @@ namespace PyXRootD files.push_back( std::string( file ) ); } + XrdCl::PrepareFlags::Flags flags; + flags = static_cast(flagval); + if ( callback && callback != Py_None ) { XrdCl::ResponseHandler *handler = GetHandler( callback ); if ( !handler ) return NULL; diff --git a/bindings/python/src/PyXRootDFileSystem.hh b/bindings/python/src/PyXRootDFileSystem.hh index f884641927e..d3dd393fe3e 100644 --- a/bindings/python/src/PyXRootDFileSystem.hh +++ b/bindings/python/src/PyXRootDFileSystem.hh @@ -124,7 +124,7 @@ namespace PyXRootD { "del_xattr", (PyCFunction) PyXRootD::FileSystem::DelXAttr, METH_VARARGS | METH_KEYWORDS, NULL }, { "list_xattr", - (PyCFunction) PyXRootD::FileSystem::DelXAttr, METH_VARARGS | METH_KEYWORDS, NULL }, + (PyCFunction) PyXRootD::FileSystem::ListXAttr, METH_VARARGS | METH_KEYWORDS, NULL }, { NULL } /* Sentinel */ };