diff --git a/AUTHORS b/AUTHORS index 9eeca9f580..0ca1276dd7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,6 +11,7 @@ answer newbie questions, and generally made Django that much better: Abeer Upadhyay Abhinav Patil Abhishek Gautam + Adam Allred Adam BogdaƂ Adam Donaghy Adam Johnson diff --git a/django/core/management/commands/shell.py b/django/core/management/commands/shell.py index cff7c73f58..e9d5aa9835 100644 --- a/django/core/management/commands/shell.py +++ b/django/core/management/commands/shell.py @@ -88,7 +88,7 @@ class Command(BaseCommand): # Execute stdin if it has anything to read and exit. # Not supported on Windows due to select.select() limitations. - if sys.platform != 'win32' and select.select([sys.stdin], [], [], 0)[0]: + if sys.platform != 'win32' and not sys.stdin.isatty() and select.select([sys.stdin], [], [], 0)[0]: exec(sys.stdin.read()) return diff --git a/docs/releases/2.1.3.txt b/docs/releases/2.1.3.txt index 15e53db65b..7e0446219e 100644 --- a/docs/releases/2.1.3.txt +++ b/docs/releases/2.1.3.txt @@ -11,3 +11,6 @@ Bugfixes * Fixed a regression in Django 2.0 where combining ``Q`` objects with ``__in`` lookups and lists crashed (:ticket:`29838`). + +* Fixed a regression in Django 1.11 where ``django-admin shell`` may hang + on startup (:ticket:`29774`).