зеркало из https://github.com/mozilla/gecko-dev.git
Bug 914394 - Handle WindowsError on non-Windows; r=ted
This commit is contained in:
Родитель
946af7a12e
Коммит
0dfbdd1ca3
|
@ -480,14 +480,15 @@ class Build(MachCommandBase):
|
|||
try:
|
||||
self.remove_objdir()
|
||||
return 0
|
||||
except WindowsError as e:
|
||||
if e.winerror in (5, 32):
|
||||
self.log(logging.ERROR, 'file_access_error', {'error': e},
|
||||
"Could not clobber because a file was in use. If the "
|
||||
"application is running, try closing it. {error}")
|
||||
return 1
|
||||
else:
|
||||
raise
|
||||
except OSError as e:
|
||||
if sys.platform.startswith('win'):
|
||||
if isinstance(e, WindowsError) and e.winerror in (5,32):
|
||||
self.log(logging.ERROR, 'file_access_error', {'error': e},
|
||||
"Could not clobber because a file was in use. If the "
|
||||
"application is running, try closing it. {error}")
|
||||
return 1
|
||||
|
||||
raise
|
||||
|
||||
|
||||
@CommandProvider
|
||||
|
|
Загрузка…
Ссылка в новой задаче