diff options
-rw-r--r-- | Lib/site.py | 4 | ||||
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-06-10-19-29-17.bpo-30167.G5EgC5.rst | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/Lib/site.py b/Lib/site.py index 950e7038a5..4595244e2f 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -104,11 +104,11 @@ def abs_paths(): continue # don't mess with a PEP 302-supplied __file__ try: m.__file__ = os.path.abspath(m.__file__) - except (AttributeError, OSError): + except (AttributeError, OSError, TypeError): pass try: m.__cached__ = os.path.abspath(m.__cached__) - except (AttributeError, OSError): + except (AttributeError, OSError, TypeError): pass @@ -1721,6 +1721,7 @@ David Watson Aaron Watters Henrik Weber Leon Weber +Steve Weber Corran Webster Glyn Webster Phil Webster diff --git a/Misc/NEWS.d/next/Library/2018-06-10-19-29-17.bpo-30167.G5EgC5.rst b/Misc/NEWS.d/next/Library/2018-06-10-19-29-17.bpo-30167.G5EgC5.rst new file mode 100644 index 0000000000..072a001ada --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-06-10-19-29-17.bpo-30167.G5EgC5.rst @@ -0,0 +1 @@ +Prevent site.main() exception if PYTHONSTARTUP is set. Patch by Steve Weber. |