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

index e433dd8a4b636e9694205c348f59752cb9f3a50c..2bfebd01ece3db7672198312fd8aed8f17b1903d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1673,6 +1673,8 @@ Extension Modules
 - Issue #7347: winreg: Add CreateKeyEx and DeleteKeyEx, as well as fix a
   bug in the return value of QueryReflectionKey.
 
+- Issue #7567: PyCurses_setupterm: Don't call `setupterm' twice.
+
 Build
 -----
 
index fafcf0d2a5d70ad6184092f70bbb4b443cf4cc5d..092fb69fb2827e30eea1821319761bf36d7f7032 100644 (file)
@@ -2126,7 +2126,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) {