From: Matthias Klose Date: Fri, 30 Jul 2010 21:27:18 +0000 (+0000) Subject: - Issue #7567: Don't call `setupterm' twice. X-Git-Tag: v2.7.1rc1~532 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e86bf72ac38e7d16ab86d9e94479a85791f0c79;p=thirdparty%2FPython%2Fcpython.git - Issue #7567: Don't call `setupterm' twice. --- diff --git a/Misc/NEWS b/Misc/NEWS index 40b918b83019..fed077297b92 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 e9b5b65f619b..5f26c7fa81bb 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) {