mirror of https://github.com/apache/cloudstack.git
bug 7191: can't use macro errno.EEXIST here, use 17 instead
status 7191: resolved fixed
This commit is contained in:
parent
0f3699f36d
commit
3b7af7e35b
|
|
@ -712,9 +712,9 @@ def makedirs(path):
|
||||||
try:
|
try:
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
except OSError, (errno, strerror):
|
except OSError, (errno, strerror):
|
||||||
if errno == errno.EEXIST:
|
if errno == 17:
|
||||||
try:
|
try:
|
||||||
cmd = ['umount', path ]
|
cmd = ['umount', '-f', path ]
|
||||||
util.pread2(cmd)
|
util.pread2(cmd)
|
||||||
except CommandException:
|
except CommandException:
|
||||||
errMsg = "CommandException raised while trying to umount " + path
|
errMsg = "CommandException raised while trying to umount " + path
|
||||||
|
|
@ -732,7 +732,7 @@ def mount(remoteDir, localDir):
|
||||||
makedirs(localDir)
|
makedirs(localDir)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
options = "soft,timeo=133,retrans=10,tcp,noac"
|
options = "soft,timeo=133,retrans=3,tcp,noac"
|
||||||
cmd = ['mount', remoteDir, localDir, "-o", options]
|
cmd = ['mount', remoteDir, localDir, "-o", options]
|
||||||
txt = util.pread2(cmd)
|
txt = util.pread2(cmd)
|
||||||
except:
|
except:
|
||||||
|
|
@ -746,7 +746,7 @@ def mount(remoteDir, localDir):
|
||||||
|
|
||||||
def umount(localDir):
|
def umount(localDir):
|
||||||
try:
|
try:
|
||||||
cmd = ['umount', localDir]
|
cmd = ['umount', '-f', localDir]
|
||||||
util.pread2(cmd)
|
util.pread2(cmd)
|
||||||
except CommandException:
|
except CommandException:
|
||||||
errMsg = "CommandException raised while trying to umount " + localDir
|
errMsg = "CommandException raised while trying to umount " + localDir
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue