From b9913cffcdcb71f72262008748c1ec10b4001fa6 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 5 Feb 2015 11:33:26 -0500 Subject: [PATCH] actually try to getattr not just check if it exists, defaulting to None Signed-off-by: Alfredo Deza --- radosgw_agent/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.3