accept a 'reg-keys' argument as a simple string insted of a list of strings in Register
Thierry Parmentelat [Fri, 18 Jul 2014 14:52:38 +0000 (16:52 +0200)]
sfa/managers/registry_manager.py

index 79e5d41..6d7bb6d 100644 (file)
@@ -394,6 +394,8 @@ class RegistryManager:
             # create RegKey objects for incoming keys
             if hasattr(record,'reg-keys'):
                 keys=getattr(record,'reg-keys')
+                # some people send the key as a string instead of a list of strings
+                if isinstance(keys,types.StringTypes): keys=[keys]
                 logger.debug ("creating %d keys for user %s"%(len(keys),record.hrn))
                 record.reg_keys = [ RegKey (key) for key in keys ]