summaryrefslogtreecommitdiffstats
path: root/ufo/gluster
diff options
context:
space:
mode:
authorMohammed Junaid <junaid@redhat.com>2013-04-03 05:40:17 +0530
committerAnand Avati <avati@redhat.com>2013-04-04 09:57:26 -0700
commita56dca94c3b174637074be46e9a537ba0ca02c4b (patch)
tree4d5d9bb543a1011be1fd8b345c1b32f939cedd40 /ufo/gluster
parent6956c710d9bffcc0d99526a9d6c051c4cebc0bdb (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')
-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 460956add..6cbdf6c35 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)