22 lines
851 B
Diff
22 lines
851 B
Diff
# django__django-13660
|
|
# Loki Mode Multi-Agent Patch
|
|
# Attempts: 1
|
|
|
|
--- a/django/core/management/commands/shell.py
|
|
+++ b/django/core/management/commands/shell.py
|
|
@@ -83,13 +83,13 @@ class Command(BaseCommand):
|
|
def handle(self, **options):
|
|
# Execute the command and exit.
|
|
if options['command']:
|
|
- exec(options['command'])
|
|
+ exec(options['command'], {})
|
|
return
|
|
|
|
# Execute stdin if it has anything to read and exit.
|
|
# Not supported on Windows due to select.select() limitations.
|
|
if sys.platform != 'win32' and not sys.stdin.isatty() and select.select([sys.stdin], [], [], 0)[0]:
|
|
- exec(sys.stdin.read())
|
|
+ exec(sys.stdin.read(), {})
|
|
return
|
|
|
|
available_shells = [options['interface']] if options['interface'] else self.shells
|