Merge "Remove some Python 2.6 compatibility code in ring"

This commit is contained in:
Zuul
2018年05月31日 23:55:57 +00:00
committed by Gerrit Code Review

View File

@@ -104,10 +104,7 @@ class RingData(object):
:param bool metadata_only: If True, only load `devs` and `part_shift`.
:returns: A RingData instance containing the loaded data.
"""
gz_file = GzipFile(filename, 'rb')
# Python 2.6 GzipFile doesn't support BufferedIO
if hasattr(gz_file, '_checkReadable'):
gz_file = BufferedReader(gz_file)
gz_file = BufferedReader(GzipFile(filename, 'rb'))
# See if the file is in the new format
magic = gz_file.read(4)
Reference in New Issue
openstack/swift
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.