Skip to content

Instantly share code, notes, and snippets.

@lukas-koschmieder
Last active June 5, 2018 19:14
Show Gist options
  • Save lukas-koschmieder/11d6566c4894e2648200ed88e196976f to your computer and use it in GitHub Desktop.
Save lukas-koschmieder/11d6566c4894e2648200ed88e196976f to your computer and use it in GitHub Desktop.
HTCondor 8.6.11 Python 3 patch
diff -r -u a/src/python-bindings/classad_python_user.cpp b/src/python-bindings/classad_python_user.cpp
--- a/src/python-bindings/classad_python_user.cpp
+++ b/src/python-bindings/classad_python_user.cpp
@@ -48,7 +48,7 @@
{
if (!Py_IsInitialized())
{
- char pname[] = "htcondor";
+ wchar_t pname[] = L"htcondor";
Py_SetProgramName(pname);
Py_InitializeEx(0);
}
diff -r -u a/src/python-bindings/collector.cpp b/src/python-bindings/collector.cpp
--- a/src/python-bindings/collector.cpp
+++ b/src/python-bindings/collector.cpp
@@ -79,7 +79,7 @@
m_collectors = CollectorList::create();
m_default = true;
}
- else if (PyString_Check(pool.ptr()) || PyUnicode_Check(pool.ptr()))
+ else if (PyBytes_Check(pool.ptr()) || PyUnicode_Check(pool.ptr()))
{
std::string pool_str = boost::python::extract<std::string>(pool);
if (pool_str.size())
diff -r -u a/src/python-bindings/collector_plugin.cpp b/src/python-bindings/collector_plugin.cpp
--- a/src/python-bindings/collector_plugin.cpp
+++ b/src/python-bindings/collector_plugin.cpp
@@ -69,7 +69,7 @@
{
if (!Py_IsInitialized())
{
- char pname[] = "condor_collector";
+ wchar_t pname[] = L"condor_collector";
Py_SetProgramName(pname);
Py_InitializeEx(0);
}
@lukas-koschmieder
Copy link
Author

lukas-koschmieder commented Jun 5, 2018

patch -p1 < condor-8.6.11-py3.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment