From: Alfredo Deza Date: Thu, 5 Feb 2015 16:33:26 +0000 (-0500) Subject: actually try to getattr not just check if it exists, defaulting to None X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b9913cffcdcb71f72262008748c1ec10b4001fa6;p=radosgw-agent.git actually try to getattr not just check if it exists, defaulting to None Signed-off-by: Alfredo Deza --- diff --git a/radosgw_agent/client.py b/radosgw_agent/client.py index c27dd03..b05d2d3 100644 --- a/radosgw_agent/client.py +++ b/radosgw_agent/client.py @@ -278,7 +278,7 @@ def is_versioned(obj): if not hasattr(obj, 'VersionedEpoch'): # overly paranoid here, an object that is not versioned should *never* # have a `VersionedEpoch` attribute - if hasattr(obj, 'version_id'): + if getattr(obj, 'version_id', None): if obj.version_id is None: return False return True # probably will never get here