mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
Fix errors on Windows. Catch the correct exception.
This commit is contained in:
parent
d5ba37b673
commit
73483ed5a0
@ -108,7 +108,9 @@ class build:
|
||||
try:
|
||||
shutil.rmtree(path.host(rmpath))
|
||||
except IOError, err:
|
||||
raise error.error('error removing: %s' % (path.host(rmpath)))
|
||||
raise error.error('error removing: %s' % (rmpath))
|
||||
except WindowsError, err:
|
||||
_notice(self.opts, 'warning: cannot remove: %s' % (rmpath))
|
||||
|
||||
def mkdir(self, mkpath):
|
||||
self._output('making dir: %s' % (path.host(mkpath)))
|
||||
@ -116,7 +118,9 @@ class build:
|
||||
try:
|
||||
os.makedirs(path.host(mkpath))
|
||||
except IOError, err:
|
||||
raise error.general('error creating path: %s' % (path.host(path)))
|
||||
_notice(self.opts, 'warning: cannot make directory: %s' % (mkpath))
|
||||
except WindowsError, err:
|
||||
_notice(self.opts, 'warning: cannot make directory: %s' % (mkpath))
|
||||
|
||||
def get_file(self, url, local):
|
||||
if not path.isdir(path.dirname(local)):
|
||||
|
Loading…
x
Reference in New Issue
Block a user