]> granicus.if.org Git - python/commitdiff
- Issue #7567: Don't call `setupterm' twice.
authorMatthias Klose <doko@ubuntu.com>
Fri, 30 Jul 2010 21:27:18 +0000 (21:27 +0000)
committerMatthias Klose <doko@ubuntu.com>
Fri, 30 Jul 2010 21:27:18 +0000 (21:27 +0000)
Misc/NEWS
Modules/_cursesmodule.c

index 40b918b830193f2767b2ac48bc05b45c7a0088c4..fed077297b92045fd031af08fb7a3d440dd6790c 100644 (file)
--- 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
 -----
 
index e9b5b65f619ba194761c7b58ebb22f6e130f27d5..5f26c7fa81bb02289f2a65ecdf98c0cb8f87299b 100644 (file)
@@ -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) {