app/django/db/backends/mysql_old/client.py
changeset 54 03e267d67478
equal deleted inserted replaced
53:57b4279d8c4e 54:03e267d67478
       
     1 from django.conf import settings
       
     2 import os
       
     3 
       
     4 def runshell():
       
     5     args = ['']
       
     6     args += ["--user=%s" % settings.DATABASE_USER]
       
     7     if settings.DATABASE_PASSWORD:
       
     8         args += ["--password=%s" % settings.DATABASE_PASSWORD]
       
     9     if settings.DATABASE_HOST:
       
    10         args += ["--host=%s" % settings.DATABASE_HOST]
       
    11     if settings.DATABASE_PORT:
       
    12         args += ["--port=%s" % settings.DATABASE_PORT]
       
    13     args += [settings.DATABASE_NAME]
       
    14     os.execvp('mysql', args)