Changeset 8990
- Timestamp:
- 09/08/08 21:18:06 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/core/management/commands/dbshell.py
r8296 r8990 1 from django.core.management.base import NoArgsCommand 1 from django.core.management.base import NoArgsCommand, CommandError 2 2 3 3 class Command(NoArgsCommand): … … 8 8 def handle_noargs(self, **options): 9 9 from django.db import connection 10 connection.client.runshell() 10 try: 11 connection.client.runshell() 12 except OSError: 13 # Note that we're assuming OSError means that the client program 14 # isn't installed. There's a possibility OSError would be raised 15 # for some other reason, in which case this error message would be 16 # inaccurate. Still, this message catches the common case. 17 raise CommandError('You appear not to have the %r program installed or on your path.' % \ 18 connection.client.executable_name)
