changeset 846:1259f9d79961

[BBB] we still in 2017 need py26 sometimes
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 Sep 2017 12:58:45 -0700
parents 70ae14b6be51
children 6c918c07d0e3
files python/install_config.py
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/python/install_config.py	Thu Aug 17 09:48:49 2017 -0700
+++ b/python/install_config.py	Sun Sep 17 12:58:45 2017 -0700
@@ -30,8 +30,14 @@
 ### standalone functions
 
 def class_mapping(_type):
-    """returns a dict of (name, class) for objects in the current globals() of _type"""
-    return {name:cls for name, cls in globals().items() if cls.issubclass(_type)}
+    """
+    returns a dict of (name, class) for objects
+    in the current globals() of _type
+    """
+
+    return dict([(name,cls)
+                 for name, cls in globals().items() if
+                 cls.issubclass(_type)])
 
 
 def execute(*commands, **kwargs):