dbapi.py
changeset 7650 278fe9c1f3ad
parent 7595 83872394b5d9
child 7665 0cd299c16f12
equal deleted inserted replaced
7649:ede740bd7077 7650:278fe9c1f3ad
   675         return self._repo.get_option_value(option, foreid)
   675         return self._repo.get_option_value(option, foreid)
   676 
   676 
   677     @check_not_closed
   677     @check_not_closed
   678     def describe(self, eid, asdict=False):
   678     def describe(self, eid, asdict=False):
   679         metas = self._repo.describe(self.sessionid, eid, **self._txid())
   679         metas = self._repo.describe(self.sessionid, eid, **self._txid())
       
   680         if len(metas) == 3: # backward compat
       
   681             metas = list(metas)
       
   682             metas.append(metas[1])
   680         if asdict:
   683         if asdict:
   681             if len(metas) == 3:
       
   682                 d = dict(zip(('type', 'source', 'extid'), metas))
       
   683                 d['asource'] = d['source']
       
   684                 return d
       
   685             return dict(zip(('type', 'source', 'extid', 'asource'), metas))
   684             return dict(zip(('type', 'source', 'extid', 'asource'), metas))
   686         # XXX :-1 for cw compat, use asdict=True for full information
   685         # XXX :-1 for cw compat, use asdict=True for full information
   687         return metas[:-1]
   686         return metas[:-1]
   688 
   687 
   689     # db-api like interface ####################################################
   688     # db-api like interface ####################################################