summaryrefslogtreecommitdiffstats
path: root/ufo/gluster/swift/common/Glusterfs.py
diff options
context:
space:
mode:
Diffstat (limited to 'ufo/gluster/swift/common/Glusterfs.py')
-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 460956add78..6cbdf6c3551 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)