exception problemi düzeltildi...
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user