~ubuntu-branches/ubuntu/precise/python-django/precise

« back to all changes in this revision

Viewing changes to django/db/backends/postgresql/client.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2010-05-21 07:52:55 UTC
  • mfrom: (1.1.10 upstream) (4.4.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100521075255-i1zpeyc0k8512pd7
Tags: 1.2-1
New upstream stable release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    def runshell(self):
10
10
        settings_dict = self.connection.settings_dict
11
11
        args = [self.executable_name]
12
 
        if settings_dict['DATABASE_USER']:
13
 
            args += ["-U", settings_dict['DATABASE_USER']]
14
 
        if settings_dict['DATABASE_HOST']:
15
 
            args.extend(["-h", settings_dict['DATABASE_HOST']])
16
 
        if settings_dict['DATABASE_PORT']:
17
 
            args.extend(["-p", str(settings_dict['DATABASE_PORT'])])
18
 
        args += [settings_dict['DATABASE_NAME']]
 
12
        if settings_dict['USER']:
 
13
            args += ["-U", settings_dict['USER']]
 
14
        if settings_dict['HOST']:
 
15
            args.extend(["-h", settings_dict['HOST']])
 
16
        if settings_dict['PORT']:
 
17
            args.extend(["-p", str(settings_dict['PORT'])])
 
18
        args += [settings_dict['NAME']]
19
19
        if os.name == 'nt':
20
20
            sys.exit(os.system(" ".join(args)))
21
21
        else: