File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -314,9 +314,17 @@ def __init__(
314314 self .path = Path (path )
315315 self .source_root = None if not source_root else Path (source_root ).resolve ()
316316 if not self .path .is_absolute () and self .source_root :
317- self .path = ( self .source_root / self .path ). resolve ()
317+ self .path = self .source_root / self .path
318318 else :
319+ self .path = self .path
320+
321+ try :
319322 self .path = self .path .resolve ()
323+ except FileNotFoundError :
324+ # this is an issue in in python 3.5, since resolve uses strict=True by
325+ # default, this workaround needs to be maintained till python 2.7 and
326+ # python 3.5 are dropped, until we can use resolve(strict=False).
327+ pass
320328
321329 def __eq__ (self , other ): # type: (Union[BuildIncludeFile, Path]) -> bool
322330 if hasattr (other , "path" ):
Original file line number Diff line number Diff line change 4444 OrderedDict = dict
4545
4646
47+ try :
48+ FileNotFoundError
49+ except NameError :
50+ FileNotFoundError = IOError # noqa
51+
52+
4753def decode (string , encodings = None ):
4854 if not PY2 and not isinstance (string , bytes ):
4955 return string
You can’t perform that action at this time.
0 commit comments