File tree 1 file changed +9
-10
lines changed
1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 12
12
import functools
13
13
import itertools
14
14
import posixpath
15
+ import contextlib
15
16
import collections
16
17
import inspect
17
18
@@ -513,16 +514,14 @@ def _read_files_egginfo_installed(self):
513
514
# But this subdir is only available in the PathDistribution's self._path
514
515
# which is not easily accessible from this base class...
515
516
subdir = getattr (self , '_path' , None )
516
- try :
517
- if text and subdir :
518
- ret = [
519
- str ((subdir / line ).resolve ().relative_to (self .locate_file ('' )))
520
- for line in text .splitlines ()
521
- ]
522
- return map ('"{}"' .format , ret )
523
- except Exception :
524
- pass
525
- return None
517
+ if not text or not subdir :
518
+ return
519
+ with contextlib .suppress (Exception ):
520
+ ret = [
521
+ str ((subdir / line ).resolve ().relative_to (self .locate_file ('' )))
522
+ for line in text .splitlines ()
523
+ ]
524
+ return map ('"{}"' .format , ret )
526
525
527
526
def _read_files_egginfo_sources (self ):
528
527
"""
You can’t perform that action at this time.
0 commit comments