]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
actually try to getattr not just check if it exists, defaulting to None
authorAlfredo Deza <adeza@redhat.com>
Thu, 5 Feb 2015 16:33:26 +0000 (11:33 -0500)
committerAlfredo Deza <adeza@redhat.com>
Thu, 5 Feb 2015 16:33:26 +0000 (11:33 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
radosgw_agent/client.py

index c27dd03980edf89cb6bcd082568ec41cd6edc168..b05d2d3c217169520155f21de160dc27a5a74cab 100644 (file)
@@ -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