[Zope-CVS] CVS: Products/ExternalEditor - CHANGES.txt:1.12 zopeedit.py:1.23

Casey Duncan casey@zope.com
Tue, 18 Jun 2002 17:41:12 -0400


Update of /cvs-repository/Products/ExternalEditor
In directory cvs.zope.org:/tmp/cvs-serv27195

Modified Files:
	CHANGES.txt zopeedit.py 
Log Message:
Fixed bug in Windows registry editor lookup


=== Products/ExternalEditor/CHANGES.txt 1.11 => 1.12 ===
 
+    - Fixed bug in Windows registry editor lookup.
+
   6/16/02 - 0.3 Release
 
     - Improved behavior when saving after lock attempts fail.


=== Products/ExternalEditor/zopeedit.py 1.22 => 1.23 ===
                         pass
 
-                if classname is not None and editor is None:
-                    # Enumerate the actions looking for one
-                    # starting with 'Edit'
-                    try:
-                        key = OpenKeyEx(HKEY_CLASSES_ROOT, classname+'\\Shell')
-                        index = 0
-                        while 1:
-                            try:
-                                subkey = EnumKey(key, index)
-                                index += 1
-                                if str(subkey).lower().startswith('edit'):
-                                    subkey = OpenKeyEx(key, 
-                                                       subkey + '\\Command')
-                                    editor, nil = QueryValueEx(subkey, None)
-                                else:
-                                    continue
-                            except EnvironmentError:
-                                break
-                    except EnvironmentError:
-                        pass
+                    if editor is None:
+                        # Enumerate the actions looking for one
+                        # starting with 'Edit'
+                        try:
+                            key = OpenKeyEx(HKEY_CLASSES_ROOT, 
+                                            classname+'\\Shell')
+                            index = 0
+                            while 1:
+                                try:
+                                    subkey = EnumKey(key, index)
+                                    index += 1
+                                    if str(subkey).lower().startswith('edit'):
+                                        subkey = OpenKeyEx(key, 
+                                                           subkey + 
+                                                           '\\Command')
+                                        editor, nil = QueryValueEx(subkey, 
+                                                                   None)
+                                    else:
+                                        continue
+                                except EnvironmentError:
+                                    break
+                        except EnvironmentError:
+                            pass
 
-                if editor is None:
-                    try:
-                        # Look for Open action in registry
-                        key = OpenKeyEx(HKEY_CLASSES_ROOT, 
-                                        classname+'\\Shell\\Open\\Command')
-                        editor, nil = QueryValueEx(key, None)
-                    except EnvironmentError:
-                        pass
+                    if editor is None:
+                        try:
+                            # Look for Open action in registry
+                            key = OpenKeyEx(HKEY_CLASSES_ROOT, 
+                                            classname+'\\Shell\\Open\\Command')
+                            editor, nil = QueryValueEx(key, None)
+                        except EnvironmentError:
+                            pass
 
                 if editor is None:
                     try: