From ea83947fd7a20571429e183eaaee1d61edca44b8 Mon Sep 17 00:00:00 2001 From: Peter Portante Date: Mon, 29 Oct 2012 14:39:44 -0400 Subject: object-storage: minor code cleanups Apply a few minor code cleanups to help reduce future refactoring diffs. * Remove extra lines between methods so that all methods are consistently spaced by one line * Remove unused field meta_file * Add missing documentation for uid and gid parameters Change-Id: I0a38eb06680eb0709edfaa1828d09657823f778e Signed-off-by: Peter Portante Reviewed-on: http://review.gluster.org/4166 Reviewed-by: Pete Zaitcev Reviewed-by: Mohammed Junaid Tested-by: Kaleb KEITHLEY --- swift/1.4.8/plugins/DiskFile.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/swift/1.4.8/plugins/DiskFile.py b/swift/1.4.8/plugins/DiskFile.py index f4ca366..1f74ff2 100644 --- a/swift/1.4.8/plugins/DiskFile.py +++ b/swift/1.4.8/plugins/DiskFile.py @@ -51,6 +51,8 @@ class Gluster_DiskFile(DiskFile): :param obj: object name for the object :param keep_data_fp: if True, don't close the fp, otherwise close it :param disk_chunk_Size: size of chunks on file reads + :param uid: user ID disk object should assume (file or directory) + :param gid: group ID disk object should assume (file or directory) """ def __init__(self, path, device, partition, account, container, obj, @@ -81,7 +83,6 @@ class Gluster_DiskFile(DiskFile): self.tmpdir = os.path.join(path, device, 'tmp') self.logger = logger self.metadata = {} - self.meta_file = None self.data_file = None self.fp = None self.iter_etag = None @@ -150,14 +151,11 @@ class Gluster_DiskFile(DiskFile): create_object_metadata(dir_path) return True - - def put_metadata(self, metadata): obj_path = self.datadir + '/' + self.obj write_metadata(obj_path, metadata) self.metadata = metadata - def put(self, fd, tmppath, metadata, extension=''): """ Finalize writing the file on disk, and renames it from the temp file to @@ -217,7 +215,6 @@ class Gluster_DiskFile(DiskFile): self.data_file = self.datadir + '/' + self.obj + extension return True - def unlinkold(self, timestamp): """ Remove any older versions of the object file. Any file that has an -- cgit