Show More
@@ -480,22 +480,15 b' class httppeer(wireproto.wirepeer):' | |||
|
480 | 480 | def _abort(self, exception): |
|
481 | 481 | raise exception |
|
482 | 482 | |
|
483 | class httpspeer(httppeer): | |
|
484 | def __init__(self, ui, path): | |
|
485 | if not url.has_https: | |
|
486 | raise error.Abort(_('Python support for SSL and HTTPS ' | |
|
487 | 'is not installed')) | |
|
488 | httppeer.__init__(self, ui, path) | |
|
489 | ||
|
490 | 483 | def instance(ui, path, create): |
|
491 | 484 | if create: |
|
492 | 485 | raise error.Abort(_('cannot create new http repository')) |
|
493 | 486 | try: |
|
494 | if path.startswith('https:'): | |
|
495 | inst = httpspeer(ui, path) | |
|
496 | else: | |
|
497 | inst = httppeer(ui, path) | |
|
487 | if path.startswith('https:') and not url.has_https: | |
|
488 | raise error.Abort(_('Python support for SSL and HTTPS ' | |
|
489 | 'is not installed')) | |
|
498 | 490 | |
|
491 | inst = httppeer(ui, path) | |
|
499 | 492 | inst._fetchcaps() |
|
500 | 493 | |
|
501 | 494 | return inst |
General Comments 0
You need to be logged in to leave comments.
Login now