summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2010-07-30 21:27:18 (GMT)
committerMatthias Klose <doko@ubuntu.com>2010-07-30 21:27:18 (GMT)
commit6e86bf72ac38e7d16ab86d9e94479a85791f0c79 (patch)
tree324bb105d6752a656be5e1e0ba9d2ee015d9e0f3
parent3e67c5c52e644876d741b6cec4e36953a7ef3c21 (diff)
downloadcpython-6e86bf72ac38e7d16ab86d9e94479a85791f0c79.zip
cpython-6e86bf72ac38e7d16ab86d9e94479a85791f0c79.tar.gz
cpython-6e86bf72ac38e7d16ab86d9e94479a85791f0c79.tar.bz2
- Issue #7567: Don't call `setupterm' twice.
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/_cursesmodule.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 40b918b..fed0772 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -78,6 +78,8 @@ Extension Modules
then that exception wasn't properly propagated on machines where
char is unsigned.
+- Issue #7567: Don't call `setupterm' twice.
+
Build
-----
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index e9b5b65..5f26c7f 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -2047,7 +2047,7 @@ PyCurses_setupterm(PyObject* self, PyObject *args, PyObject* keywds)
}
}
- if (setupterm(termstr,fd,&err) == ERR) {
+ if (!initialised_setupterm && setupterm(termstr,fd,&err) == ERR) {
char* s = "setupterm: unknown error";
if (err == 0) {