Ticket #2278: django-bug-2278.patch

File django-bug-2278.patch, 830 bytes (added by hawk@…, 18 years ago)
  • django/db/backends/postgresql/client.py

     
    22import os
    33
    44def runshell():
    5     args = ['']
    6     args += ["-U%s" % settings.DATABASE_USER]
    7     if settings.DATABASE_PASSWORD:
     5    args = ["-U", settings.DATABASE_USER]
     6    if not settings.DATABASE_PASSWORD:
    87        args += ["-W"]
    98    if settings.DATABASE_HOST:
    10         args += ["-h %s" % settings.DATABASE_HOST]
     9        args.extend(["-h", settings.DATABASE_HOST])
    1110    if settings.DATABASE_PORT:
    12         args += ["-p %s" % settings.DATABASE_PORT]
     11        args.extend(["-p", settings.DATABASE_PORT])
    1312    args += [settings.DATABASE_NAME]
    1413    os.execvp('psql', args)
Back to Top