server/utils.py
changeset 10095 200bd6a601dc
parent 9610 29450466273a
child 10589 7c23b7de2b8d
equal deleted inserted replaced
10094:954765f57fb6 10095:200bd6a601dc
    79     database, (e.g. during tests), eschema.eid is not set.
    79     database, (e.g. during tests), eschema.eid is not set.
    80     """
    80     """
    81     if eschema.eid is None:
    81     if eschema.eid is None:
    82         eschema.eid = cnx.execute(
    82         eschema.eid = cnx.execute(
    83             'Any X WHERE X is CWEType, X name %(name)s',
    83             'Any X WHERE X is CWEType, X name %(name)s',
    84             {'name': str(eschema)})[0][0]
    84             {'name': unicode(eschema)})[0][0]
    85     return eschema.eid
    85     return eschema.eid
    86 
    86 
    87 
    87 
    88 DEFAULT_MSG = 'we need a manager connection on the repository \
    88 DEFAULT_MSG = 'we need a manager connection on the repository \
    89 (the server doesn\'t have to run, even should better not)'
    89 (the server doesn\'t have to run, even should better not)'