summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Portante <peter.portante@redhat.com>2012-10-24 10:30:56 -0400
committerVijay Bellur <vbellur@redhat.com>2012-11-03 04:39:51 -0700
commitcae3216a2bff57c41003a7ad9532decc51412dbe (patch)
tree84b1e9c20f8809b4597e2a803f118b13458cf68a
parent6478b569c379dd0520ac3a46789284af5eb6cb4d (diff)
object-storage: use constants for directory names
Change-Id: I6109ee55061eae53c4c6762ca31fb5c4b13f0071 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4140 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--swift/1.4.8/plugins/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/swift/1.4.8/plugins/utils.py b/swift/1.4.8/plugins/utils.py
index c011b681f0b..a1ac64db5c9 100644
--- a/swift/1.4.8/plugins/utils.py
+++ b/swift/1.4.8/plugins/utils.py
@@ -19,6 +19,7 @@ import errno
import xattr
from hashlib import md5
from swift.common.utils import normalize_timestamp, TRUE_VALUES
+from swift.obj.server import ASYNCDIR
import cPickle as pickle
from ConfigParser import ConfigParser, NoSectionError, NoOptionError
@@ -40,6 +41,7 @@ MAX_XATTR_SIZE = 65536
CONTAINER = 'container'
DIR = 'dir'
MARKER_DIR = 'marker_dir'
+TEMP_DIR = 'tmp'
FILE = 'file'
DIR_TYPE = 'application/directory'
FILE_TYPE = 'application/octet-stream'
@@ -499,8 +501,8 @@ def _get_account_details_from_fs(acc_path, acc_stats):
is_dir = (acc_stats.st_mode & 0040000) != 0
if is_dir:
for name in do_listdir(acc_path):
- if name.lower() == 'tmp' \
- or name.lower() == 'async_pending' \
+ if name.lower() == TEMP_DIR \
+ or name.lower() == ASYNCDIR \
or not os.path.isdir(os.path.join(acc_path, name)):
continue
container_count += 1