summaryrefslogtreecommitdiffstats
path: root/ufo/gluster/swift
diff options
context:
space:
mode:
authorMohammed Junaid <junaid@redhat.com>2013-04-03 05:40:17 +0530
committerPeter Portante <peter.portante@redhat.com>2013-04-29 16:35:57 -0400
commit9d520a05baf91cdbed17e31a15dcbce0d35191d0 (patch)
tree1671e69361e9fe90145a53b0b705c1f9af286648 /ufo/gluster/swift
parentce1fd47287787ea9c90a712337d709245cb3445d (diff)
object-storage: Import missing sys and errno modules.
Import the missing modules and implemented unit test case for Glusterfs module. Thanks to Paul Smith for pointing it out. Change-Id: Ib04202aa0ae05c4da2ebbf11f87d6accc778f827 BUG: 905946 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.org/4758 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'ufo/gluster/swift')
-rw-r--r--ufo/gluster/swift/common/Glusterfs.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ufo/gluster/swift/common/Glusterfs.py b/ufo/gluster/swift/common/Glusterfs.py
index 460956a..6cbdf6c 100644
--- a/ufo/gluster/swift/common/Glusterfs.py
+++ b/ufo/gluster/swift/common/Glusterfs.py
@@ -14,7 +14,7 @@
# limitations under the License.
import logging
-import os, fcntl, time
+import os, sys, fcntl, time, errno
from ConfigParser import ConfigParser, NoSectionError, NoOptionError
from swift.common.utils import TRUE_VALUES, search_tree
from gluster.swift.common.fs_utils import mkdirs
@@ -81,7 +81,8 @@ def mount(root, drive):
fcntl.lockf(f, fcntl.LOCK_EX|fcntl.LOCK_NB)
except:
ex = sys.exc_info()[1]
- if isinstance(ex, IOError) and ex.errno in (EACCES, EAGAIN):
+ if isinstance(ex, IOError) and ex.errno in \
+ (errno.EACCES, errno.EAGAIN):
# This means that some other process is mounting the
# filesystem, so wait for the mount process to complete
return _busy_wait(full_mount_path)