Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 626189 Details for
Bug 865858
Potentially unnecessary file opens/closes performed around xattr read/writes
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Initial patch to remove the use of deprecated pyxattr methods.
0001-Refactor-to-use-pyxattr-s-get-set-remove-methods.patch (text/plain), 2.94 KB, created by
Peter Portante
on 2012-10-12 19:11:21 UTC
(
hide
)
Description:
Initial patch to remove the use of deprecated pyxattr methods.
Filename:
MIME Type:
Creator:
Peter Portante
Created:
2012-10-12 19:11:21 UTC
Size:
2.94 KB
patch
obsolete
>From 7e602640c4d44714ed71df32daa68ea23aa9e22b Mon Sep 17 00:00:00 2001 >From: Peter Portante <peter.portante@redhat.com> >Date: Fri, 12 Oct 2012 13:07:24 -0400 >Subject: [PATCH 1/2] Refactor to use pyxattr's get/set/remove methods > >These methods are not deprecated, the old ones with the xattr suffix are >considered deprecated starting with 0.4 of pyxattr. > >Signed-off-by: Peter Portante <peter.portante@redhat.com> >--- > swift/1.4.8/plugins/utils.py | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > >diff --git a/swift/1.4.8/plugins/utils.py b/swift/1.4.8/plugins/utils.py >index d8fc7a4..b282f42 100644 >--- a/swift/1.4.8/plugins/utils.py >+++ b/swift/1.4.8/plugins/utils.py >@@ -16,9 +16,9 @@ > import logging > import os > import errno >+import xattr > from hashlib import md5 > from swift.common.utils import normalize_timestamp >-from xattr import setxattr, removexattr, getxattr, removexattr > import cPickle as pickle > > X_CONTENT_TYPE = 'Content-Type' >@@ -182,9 +182,9 @@ def do_setxattr(path, key, value): > fd = path > if fd or os.path.isdir(path): > try: >- setxattr(fd, key, value) >+ xattr.set(fd, key, value) > except Exception, err: >- logging.exception("setxattr failed on %s key %s err: %s", path, key, str(err)) >+ logging.exception("xattr.set failed on %s key %s err: %s", path, key, str(err)) > raise > finally: > if fd and not os.path.isdir(path): >@@ -204,10 +204,10 @@ def do_getxattr(path, key, log = True): > fd = path > if fd or os.path.isdir(path): > try: >- value = getxattr(fd, key) >+ value = xattr.get(fd, key) > except Exception, err: > if log: >- logging.exception("getxattr failed on %s key %s err: %s", path, key, str(err)) >+ logging.exception("xattr.get failed on %s key %s err: %s", path, key, str(err)) > raise > finally: > if fd and not os.path.isdir(path): >@@ -225,9 +225,9 @@ def do_removexattr(path, key): > fd = path > if fd or os.path.isdir(path): > try: >- removexattr(fd, key) >+ xattr.remove(fd, key) > except Exception, err: >- logging.exception("removexattr failed on %s key %s err: %s", path, key, str(err)) >+ logging.exception("xattr.remove failed on %s key %s err: %s", path, key, str(err)) > raise > finally: > if fd and not os.path.isdir(path): >@@ -313,9 +313,9 @@ def check_user_xattr(path): > return False > do_setxattr(path, 'user.test.key1', 'value1') > try: >- removexattr(path, 'user.test.key1') >+ xattr.remove(path, 'user.test.key1') > except Exception, err: >- logging.exception("removexattr failed on %s err: %s", path, str(err)) >+ logging.exception("xattr.remove failed on %s err: %s", path, str(err)) > #Remove xattr may fail in case of concurrent remove. > return True > >-- >1.7.11.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 865858
: 626189 |
626190