summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Monnerat <[email protected]>2019-01-19 01:26:26 +0100
committerVictor Kareh <[email protected]>2019-01-30 15:59:28 -0500
commit855e61271bb357b5ccd8beb5541be45ecf62a74f (patch)
tree734759c97e30cbdaf62484bb4d3e86fab055c5a0
parent047c35bf0aaec2601d6e26e5ab479eeccc58f640 (diff)
downloadpython-caja-855e61271bb357b5ccd8beb5541be45ecf62a74f.tar.bz2
python-caja-855e61271bb357b5ccd8beb5541be45ecf62a74f.tar.xz
Make Python statements compatible with version 2 and 3.
-rw-r--r--docs/Makefile.am2
-rw-r--r--src/caja-python.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 47e8ab0..70021bc 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -86,7 +86,7 @@ BUILT_SOURCES = \
$(HTML_FILES)
reference/builddate.xml: $(REFERENCE_DEPS)
- $(PYTHON) -c 'import datetime; print datetime.date.today()' > $@
+ $(PYTHON) -c 'import datetime; print (datetime.date.today())' > $@
$(HTML_FILES): $(REFERENCE_DEPS)
xsltproc --nonet --xinclude -o $(BUILDDIR)/html/ \
diff --git a/src/caja-python.c b/src/caja-python.c
index 4a310a4..237e216 100644
--- a/src/caja-python.c
+++ b/src/caja-python.c
@@ -196,7 +196,7 @@ caja_python_init_python (void)
}
debug("Sanitize the python search path");
- PyRun_SimpleString("import sys; sys.path = filter(None, sys.path)");
+ PyRun_SimpleString("import sys; sys.path = list(filter(None, sys.path))");
if (PyErr_Occurred())
{
PyErr_Print();