mirror of https://gitlab.com/ita1024/waf.git
Fix a wrong error message when installing to readonly folders
This commit is contained in:
parent
57e711d801
commit
3c132ad97a
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
# encoding: utf-8
|
||||
# Thomas Nagy, 2005-2010 (ita)
|
||||
# Thomas Nagy, 2005-2016 (ita)
|
||||
|
||||
"""
|
||||
Classes related to the build phase (build, clean, install, step, etc)
|
||||
|
@ -1173,10 +1173,12 @@ class inst(Task.Task):
|
|||
|
||||
try:
|
||||
self.copy_fun(src, tgt)
|
||||
except IOError:
|
||||
if not src.exists():
|
||||
except EnvironmentError as e:
|
||||
if not os.path.exists(src):
|
||||
Logs.error('File %r does not exist', src)
|
||||
raise Errors.WafError('Could not install the file %r' % tgt)
|
||||
elif not os.path.isfile(src):
|
||||
Logs.error('Input %r is not a file', src)
|
||||
raise Errors.WafError('Could not install the file %r' % tgt, e)
|
||||
|
||||
def do_link(self, src, tgt, **kw):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue