VCS/__init__.py

branch
maintenance
changeset 6206
a02b03b7bfec
parent 6188
5a6ae3be31e6
child 6303
ec9ebaf206fb
--- a/VCS/__init__.py	Sun Mar 04 14:55:23 2018 +0100
+++ b/VCS/__init__.py	Mon Apr 02 12:04:18 2018 +0200
@@ -40,23 +40,16 @@
     if vc is None:
         # try alternative vcs interfaces assuming, that there is a common
         # indicator for the alternatives
-        found = False
-        for indicator, vcsData in \
-                pluginManager.getVcsSystemIndicators().items():
-            for vcsSystem, vcsSystemDisplay in vcsData:
-                if vcsSystem == vcs:
-                    found = True
-                    break
-            
-            if found:
-                if len(vcsData) > 1:
-                    for vcsSystem, vcsSystemDisplay in vcsData:
+        for vcsData in pluginManager.getVcsSystemIndicators().values():
+            for vcsSystem, _vcsSystemDisplay in vcsData:
+                if vcsSystem == vcs and len(vcsData) > 1:
+                    for vcsSystem, _vcsSystemDisplay in vcsData:
                         if vcsSystem != vcs:
                             vc = pluginManager.getPluginObject(
                                 "version_control", vcsSystem, maybeActive=True)
                             if vc is not None:
-                                break
-                break
+                                return vc
+    
     return vc
 
 

eric ide

mercurial