mercurial/debugcommands.py
changeset 39956 36e9d2c60837
parent 39955 c421c22d3ad2
child 39980 d71e0ba34d9b
equal deleted inserted replaced
39955:c421c22d3ad2 39956:36e9d2c60837
  3322             except util.urlerr.urlerror as e:
  3322             except util.urlerr.urlerror as e:
  3323                 # read() method must be called, but only exists in Python 2
  3323                 # read() method must be called, but only exists in Python 2
  3324                 getattr(e, 'read', lambda: None)()
  3324                 getattr(e, 'read', lambda: None)()
  3325                 continue
  3325                 continue
  3326 
  3326 
  3327             if res.headers.get('Content-Type') == 'application/mercurial-cbor':
  3327             ct = res.headers.get(r'Content-Type')
       
  3328             if ct == r'application/mercurial-cbor':
  3328                 ui.write(_('cbor> %s\n') %
  3329                 ui.write(_('cbor> %s\n') %
  3329                          stringutil.pprint(cborutil.decodeall(body)[0],
  3330                          stringutil.pprint(cborutil.decodeall(body)[0],
  3330                                            bprefix=True,
  3331                                            bprefix=True,
  3331                                            indent=2))
  3332                                            indent=2))
  3332 
  3333