From: Tony Mack Date: Thu, 30 Aug 2012 15:23:35 +0000 (-0400) Subject: fix potential attribute error X-Git-Tag: sfa-3.0-0~123 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=e5304e35c8efab55e7cffcb2500b3420b1004ee6;p=sfa.git fix potential attribute error --- diff --git a/sfa/openstack/osxrn.py b/sfa/openstack/osxrn.py index cb30eb2c..6a3944c9 100644 --- a/sfa/openstack/osxrn.py +++ b/sfa/openstack/osxrn.py @@ -19,6 +19,7 @@ class OSXrn(Xrn): config = Config() self.id = id if name is not None: + Xrn.__init__(self, **kwds) if 'type' in kwds: self.type = kwds['type'] if auth is not None: diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index 02f4adb9..0721f818 100644 --- a/sfa/util/xrn.py +++ b/sfa/util/xrn.py @@ -116,7 +116,7 @@ class Xrn: # self.type # self.path # provide either urn, or (hrn + type) - def __init__ (self, xrn, type=None, id=None): + def __init__ (self, xrn="", type=None, id=None): if not xrn: xrn = "" # user has specified xrn : guess if urn or hrn self.id = id