summaryrefslogtreecommitdiff
path: root/django/db/backends/sqlite3/client.py
blob: 5e28e389d07212a673306c2883f95d5e45cb1e86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django.db.backends import BaseDatabaseClient
from django.conf import settings
import os
import sys

class DatabaseClient(BaseDatabaseClient):
    executable_name = 'sqlite3'

    def runshell(self):
        args = [self.executable_name, settings.DATABASE_NAME]
        if os.name == 'nt':
            sys.exit(os.system(" ".join(args)))
        else:
            os.execvp(self.executable_name, args)