equal
deleted
inserted
replaced
26 from math import log |
26 from math import log |
27 from contextlib import contextmanager |
27 from contextlib import contextmanager |
28 from warnings import warn |
28 from warnings import warn |
29 from itertools import chain |
29 from itertools import chain |
30 |
30 |
31 from six import string_types |
31 from six import text_type, string_types |
32 from six.moves import range |
32 from six.moves import range |
33 from six.moves.urllib.parse import urlparse, parse_qs, unquote as urlunquote |
33 from six.moves.urllib.parse import urlparse, parse_qs, unquote as urlunquote |
34 |
34 |
35 import yams.schema |
35 import yams.schema |
36 |
36 |
346 |
346 |
347 This method will be called by the database handler once the config has |
347 This method will be called by the database handler once the config has |
348 been properly bootstrapped. |
348 been properly bootstrapped. |
349 """ |
349 """ |
350 admincfg = config.default_admin_config |
350 admincfg = config.default_admin_config |
351 cls.admlogin = unicode(admincfg['login']) |
351 cls.admlogin = text_type(admincfg['login']) |
352 cls.admpassword = admincfg['password'] |
352 cls.admpassword = admincfg['password'] |
353 # uncomment the line below if you want rql queries to be logged |
353 # uncomment the line below if you want rql queries to be logged |
354 #config.global_set_option('query-log-file', |
354 #config.global_set_option('query-log-file', |
355 # '/tmp/test_rql_log.' + `os.getpid()`) |
355 # '/tmp/test_rql_log.' + `os.getpid()`) |
356 config.global_set_option('log-file', None) |
356 config.global_set_option('log-file', None) |