]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't complain that non-existant registry entries cannot be deleted.
authorThomas Heller <theller@ctypes.org>
Wed, 14 Jul 2004 14:56:11 +0000 (14:56 +0000)
committerThomas Heller <theller@ctypes.org>
Wed, 14 Jul 2004 14:56:11 +0000 (14:56 +0000)
Backported from trunk.

PC/bdist_wininst/install.c

index ec28f8aa8232cda1c102d5e124b762aa5d9e0ee5..e9308c9cd199a9f17fde1e10a85bc8c105f1bd1c 100644 (file)
@@ -1982,7 +1982,7 @@ void DeleteRegistryKey(char *string)
                MessageBox(GetFocus(), string, "Could not open key", MB_OK);
        else {
                result = RegDeleteKey(hKey, subkeyname);
-               if (result != ERROR_SUCCESS)
+               if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND)
                        MessageBox(GetFocus(), string, "Could not delete key", MB_OK);
                RegCloseKey(hKey);
        }
@@ -2024,7 +2024,7 @@ void DeleteRegistryValue(char *string)
                MessageBox(GetFocus(), string, "Could not open key", MB_OK);
        else {
                result = RegDeleteValue(hKey, valuename);
-               if (result != ERROR_SUCCESS)
+               if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND)
                        MessageBox(GetFocus(), string, "Could not delete value", MB_OK);
                RegCloseKey(hKey);
        }