summaryrefslogtreecommitdiffstats
path: root/google_appengine/lib/django/django/db/backends/mysql_old/client.py
blob: f9d6297b8e07f1832bad1f231c5e58df4271c1f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django.conf import settings
import os

def runshell():
    args = ['']
    args += ["--user=%s" % settings.DATABASE_USER]
    if settings.DATABASE_PASSWORD:
        args += ["--password=%s" % settings.DATABASE_PASSWORD]
    if settings.DATABASE_HOST:
        args += ["--host=%s" % settings.DATABASE_HOST]
    if settings.DATABASE_PORT:
        args += ["--port=%s" % settings.DATABASE_PORT]
    args += [settings.DATABASE_NAME]
    os.execvp('mysql', args)