From 0a2fb5f0e9001f9aa1c5aa2140baa5142ea2a10f Mon Sep 17 00:00:00 2001
From: Sinisa Veseli <sveseli@aps.anl.gov>
Date: Mon, 13 Apr 2015 13:15:00 +0000
Subject: [PATCH] use standard constructor form for authorization principal

---
 src/python/dm/common/objects/authorizationPrincipal.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/python/dm/common/objects/authorizationPrincipal.py b/src/python/dm/common/objects/authorizationPrincipal.py
index 271138e7..566ac160 100755
--- a/src/python/dm/common/objects/authorizationPrincipal.py
+++ b/src/python/dm/common/objects/authorizationPrincipal.py
@@ -4,8 +4,14 @@ from dmObject import DmObject
 
 class AuthorizationPrincipal(DmObject):
 
-    def __init__(self, name, token=None, userInfo={}):
-        DmObject.__init__(self,{'name' : name, 'token' : token, 'userInfo' : userInfo})
+    def __init__(self, dict={}, name=None, token=None, userInfo={}):
+        DmObject.__init__(self, dict)
+        if name is not None:
+            self['name'] = name
+        if token is not None:
+            self['token'] = token
+        if userInfo is not None and len(userInfo):
+            self['userInfo'] = userInfo
 
     def getName(self):
         return self.get('name')
-- 
GitLab