exception problemi düzeltildi...
This commit is contained in:
@@ -194,9 +194,7 @@ def dosym(sourceFile, destinationFile):
|
|||||||
'''creates soft link between sourceFile and destinationFile'''
|
'''creates soft link between sourceFile and destinationFile'''
|
||||||
|
|
||||||
''' example call: pisitools.dosym("/usr/bin/bash", "/bin/bash")'''
|
''' example call: pisitools.dosym("/usr/bin/bash", "/bin/bash")'''
|
||||||
path = join_path(get.installDIR(), os.path.dirname(destinationFile))
|
makedirs(join_path(get.installDIR(), os.path.dirname(destinationFile)))
|
||||||
if not os.access(path, os.F_OK):
|
|
||||||
makedirs(path)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.symlink(sourceFile, join_path(get.installDIR() ,destinationFile))
|
os.symlink(sourceFile, join_path(get.installDIR() ,destinationFile))
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ def can_access_directory(destinationDirectory):
|
|||||||
def makedirs(destinationDirectory):
|
def makedirs(destinationDirectory):
|
||||||
'''recursive directory creation function'''
|
'''recursive directory creation function'''
|
||||||
try:
|
try:
|
||||||
os.makedirs(destinationDirectory)
|
if not os.access(destinationDirectory, os.F_OK):
|
||||||
|
os.makedirs(destinationDirectory)
|
||||||
except OSError:
|
except OSError:
|
||||||
error(_('Cannot create directory %s' % destinationDirectory))
|
error(_('Cannot create directory %s' % destinationDirectory))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user