equal
deleted
inserted
replaced
3205 |
3205 |
3206 try: |
3206 try: |
3207 res = opener.open(req) |
3207 res = opener.open(req) |
3208 body = res.read() |
3208 body = res.read() |
3209 except util.urlerr.urlerror as e: |
3209 except util.urlerr.urlerror as e: |
3210 e.read() |
3210 # read() method must be called, but only exists in Python 2 |
|
3211 getattr(e, 'read', lambda: None)() |
3211 continue |
3212 continue |
3212 |
3213 |
3213 if res.headers.get('Content-Type') == 'application/mercurial-cbor': |
3214 if res.headers.get('Content-Type') == 'application/mercurial-cbor': |
3214 ui.write(_('cbor> %s\n') % |
3215 ui.write(_('cbor> %s\n') % |
3215 stringutil.pprint(cbor.loads(body), bprefix=True)) |
3216 stringutil.pprint(cbor.loads(body), bprefix=True)) |