summaryrefslogtreecommitdiff
path: root/psycopg/adapter_datetime.c
diff options
context:
space:
mode:
Diffstat (limited to 'psycopg/adapter_datetime.c')
-rw-r--r--psycopg/adapter_datetime.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/psycopg/adapter_datetime.c b/psycopg/adapter_datetime.c
index 5850be8..bf31cfa 100644
--- a/psycopg/adapter_datetime.c
+++ b/psycopg/adapter_datetime.c
@@ -427,6 +427,10 @@ psyco_DateFromTicks(PyObject *self, PyObject *args)
Py_DECREF(args);
}
}
+ else {
+ PyErr_SetString(InterfaceError, "failed localtime call");
+ }
+
return res;
}
@@ -451,6 +455,10 @@ psyco_TimeFromTicks(PyObject *self, PyObject *args)
Py_DECREF(args);
}
}
+ else {
+ PyErr_SetString(InterfaceError, "failed localtime call");
+ }
+
return res;
}
@@ -473,6 +481,9 @@ psyco_TimestampFromTicks(PyObject *self, PyObject *args)
tm.tm_hour, tm.tm_min, (double)tm.tm_sec + ticks,
pyPsycopgTzLOCAL);
}
+ else {
+ PyErr_SetString(InterfaceError, "failed localtime call");
+ }
return res;
}