Fixed an issue in the password manager causing it to crash. 5_1_x

Sun, 15 Jan 2012 16:32:42 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 15 Jan 2012 16:32:42 +0100
branch
5_1_x
changeset 1556
780dbd947128
parent 1553
a59ae5932ca0
child 1632
32b1f2d26597

Fixed an issue in the password manager causing it to crash.
(transplanted from 0c714800ff48f4029865620a5dc4d36810da2203)

Helpviewer/Passwords/PasswordManager.py file | annotate | diff | comparison | revisions
diff -r a59ae5932ca0 -r 780dbd947128 Helpviewer/Passwords/PasswordManager.py
--- a/Helpviewer/Passwords/PasswordManager.py	Sun Jan 15 10:58:22 2012 +0100
+++ b/Helpviewer/Passwords/PasswordManager.py	Sun Jan 15 16:32:42 2012 +0100
@@ -456,9 +456,12 @@
             formElementTypes = {}
             deadElements = set()
             for elementMap in elements:
-                name = elementMap["name"]
-                value = elementMap["value"]
-                type_ = elementMap["type"]
+                try:
+                    name = elementMap["name"]
+                    value = elementMap["value"]
+                    type_ = elementMap["type"]
+                except KeyError:
+                    continue
                 if type_ == "password":
                     formHasPasswords = True
                 t = (name, value)

eric ide

mercurial