summaryrefslogtreecommitdiffstats
path: root/Modules/datetimemodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/datetimemodule.c')
-rw-r--r--Modules/datetimemodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c
index 1e30f7e..b91a082 100644
--- a/Modules/datetimemodule.c
+++ b/Modules/datetimemodule.c
@@ -1329,7 +1329,7 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple,
goto Done;
{
PyObject *format;
- PyObject *time = PyImport_ImportModule("time");
+ PyObject *time = PyImport_ImportModuleNoBlock("time");
if (time == NULL)
goto Done;
format = PyUnicode_FromString(PyString_AS_STRING(newfmt));
@@ -1357,7 +1357,7 @@ static PyObject *
time_time(void)
{
PyObject *result = NULL;
- PyObject *time = PyImport_ImportModule("time");
+ PyObject *time = PyImport_ImportModuleNoBlock("time");
if (time != NULL) {
result = PyObject_CallMethod(time, "time", "()");
@@ -1375,7 +1375,7 @@ build_struct_time(int y, int m, int d, int hh, int mm, int ss, int dstflag)
PyObject *time;
PyObject *result = NULL;
- time = PyImport_ImportModule("time");
+ time = PyImport_ImportModuleNoBlock("time");
if (time != NULL) {
result = PyObject_CallMethod(time, "struct_time",
"((iiiiiiiii))",
@@ -3821,7 +3821,7 @@ datetime_strptime(PyObject *cls, PyObject *args)
if (!PyArg_ParseTuple(args, "uu:strptime", &string, &format))
return NULL;
- if ((module = PyImport_ImportModule("time")) == NULL)
+ if ((module = PyImport_ImportModuleNoBlock("time")) == NULL)
return NULL;
obj = PyObject_CallMethod(module, "strptime", "uu", string, format);
Py_DECREF(module);