pep8
This commit is contained in:
parent
29eddb8c24
commit
e64e21dd01
@ -39,6 +39,7 @@ def tmpfile(content):
|
||||
|
||||
xattr_data = {}
|
||||
|
||||
|
||||
def _get_inode(fd):
|
||||
if not isinstance(fd, int):
|
||||
try:
|
||||
@ -47,12 +48,14 @@ def _get_inode(fd):
|
||||
return os.stat(fd).st_ino
|
||||
return os.fstat(fd).st_ino
|
||||
|
||||
|
||||
def _setxattr(fd, k, v):
|
||||
inode = _get_inode(fd)
|
||||
data = xattr_data.get(inode, {})
|
||||
data[k] = v
|
||||
xattr_data[inode] = data
|
||||
|
||||
|
||||
def _getxattr(fd, k):
|
||||
inode = _get_inode(fd)
|
||||
data = xattr_data.get(inode, {}).get(k)
|
||||
|
@ -34,7 +34,8 @@ class TestContainerController(unittest.TestCase):
|
||||
""" Test swift.container_server.ContainerController """
|
||||
def setUp(self):
|
||||
""" Set up for testing swift.object_server.ObjectController """
|
||||
self.testdir = os.path.join(mkdtemp(), 'tmp_test_object_server_ObjectController')
|
||||
self.testdir = os.path.join(mkdtemp(),
|
||||
'tmp_test_object_server_ObjectController')
|
||||
mkdirs(self.testdir)
|
||||
rmtree(self.testdir)
|
||||
mkdirs(os.path.join(self.testdir, 'sda1'))
|
||||
|
Loading…
Reference in New Issue
Block a user