[Python-checkins] cpython (merge 2.7 -> 2.7): merge 2.7.9 release branch

benjamin.peterson python-checkins at python.org
Fri Nov 28 03:41:54 CET 2014


https://hg.python.org/cpython/rev/713e5814640d
changeset:   93637:713e5814640d
branch:      2.7
parent:      93635:c7d45da654ee
parent:      93636:1ac5aec658f6
user:        Benjamin Peterson <benjamin at python.org>
date:        Thu Nov 27 20:40:35 2014 -0600
summary:
  merge 2.7.9 release branch

files:
  PC/bdist_wininst/install.c |  10 ++++++++++
  1 files changed, 10 insertions(+), 0 deletions(-)


diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c
--- a/PC/bdist_wininst/install.c
+++ b/PC/bdist_wininst/install.c
@@ -1742,6 +1742,16 @@
 
     sprintf(buffer, "%s\\%s-wininst.log", dir, meta_name);
     logfile = fopen(buffer, "a");
+    if (!logfile) {
+        char error[1024];
+
+        sprintf(error, "Can't create \"%s\" (%s).\n\n"
+                "Try to execute the installer as administrator.",
+                buffer, strerror(errno));
+        MessageBox(GetFocus(), error, NULL, MB_OK | MB_ICONSTOP);
+        return FALSE;
+    }
+
     time(&ltime);
     now = localtime(&ltime);
     strftime(buffer, sizeof(buffer),

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list