Skip to content

Commit 926a3ef

Browse files
committed
Update YouTuber.cpp
1 parent 8642e2b commit 926a3ef

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

Player/YouTuber.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,17 +470,29 @@ bool EnsureSharedPythonNamespaceLoaded(boost::python::object& outNamespace)
470470
using namespace boost::python;
471471

472472
static bool s_loaded = false;
473+
static bool s_failed = false;
473474
static object s_namespace;
474475

476+
if (s_failed)
477+
return false;
478+
475479
if (s_loaded)
476480
{
477481
outNamespace = s_namespace;
478482
return true;
479483
}
480484

485+
s_failed = true;
486+
481487
if (!isPythonInstalled())
482488
{
483-
BOOST_LOG_TRIVIAL(error) << "Python not installed or wrong bitness.";
489+
AfxMessageBox(_T("Matching Python is not installed: ") _T(PY_VERSION)
490+
#ifdef _WIN64
491+
_T(" (64 bits)")
492+
#else
493+
_T(" (32 bits)")
494+
#endif
495+
);
484496
return false;
485497
}
486498

@@ -528,6 +540,7 @@ bool EnsureSharedPythonNamespaceLoaded(boost::python::object& outNamespace)
528540

529541
s_namespace = global;
530542
s_loaded = true;
543+
s_failed = false;
531544
outNamespace = s_namespace;
532545
return true;
533546
}

0 commit comments

Comments
 (0)