exception problemi düzeltildi...

This commit is contained in:
S.Çağlar Onur
2005-10-12 17:13:37 +00:00
parent c9f217b054
commit ac954333c4
2 changed files with 3 additions and 4 deletions
+1 -3
View File
@@ -194,9 +194,7 @@ def dosym(sourceFile, destinationFile):
'''creates soft link between sourceFile and destinationFile'''
''' example call: pisitools.dosym("/usr/bin/bash", "/bin/bash")'''
path = join_path(get.installDIR(), os.path.dirname(destinationFile))
if not os.access(path, os.F_OK):
makedirs(path)
makedirs(join_path(get.installDIR(), os.path.dirname(destinationFile)))
try:
os.symlink(sourceFile, join_path(get.installDIR() ,destinationFile))
+2 -1
View File
@@ -40,7 +40,8 @@ def can_access_directory(destinationDirectory):
def makedirs(destinationDirectory):
'''recursive directory creation function'''
try:
os.makedirs(destinationDirectory)
if not os.access(destinationDirectory, os.F_OK):
os.makedirs(destinationDirectory)
except OSError:
error(_('Cannot create directory %s' % destinationDirectory))