From 222a1e27d5a50e255dfacf5378225b9ec78dd124 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 8 Oct 2013 17:59:31 +0200 Subject: apt_pkg: Support paths supplied as bytes objects (See: #680971) We should be done now. DO NOT MERGE --- python/apt_pkgmodule.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/apt_pkgmodule.cc') diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index 4cffcaa5..5b06f721 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -434,9 +434,9 @@ static char *doc_GetLock = "provided by apt_pkg.FileLock instead using the with-statement."; static PyObject *GetLock(PyObject *Self,PyObject *Args) { - const char *file; + PyApt_Filename file; char errors = false; - if (PyArg_ParseTuple(Args,"s|b",&file,&errors) == 0) + if (PyArg_ParseTuple(Args,"O&|b",PyApt_Filename::Converter, &file,&errors) == 0) return 0; int fd = GetLock(file, errors); -- cgit v1.2.3