Show More
@@ -28,6 +28,7 b' class httprepository(wireproto.wirerepos' | |||
|
28 | 28 | self.path = path |
|
29 | 29 | self.caps = None |
|
30 | 30 | self.handler = None |
|
31 | self.urlopener = None | |
|
31 | 32 | u = util.url(path) |
|
32 | 33 | if u.query or u.fragment: |
|
33 | 34 | raise util.Abort(_('unsupported URL component: "%s"') % |
@@ -42,9 +43,10 b' class httprepository(wireproto.wirerepos' | |||
|
42 | 43 | self.urlopener = url.opener(ui, authinfo) |
|
43 | 44 | |
|
44 | 45 | def __del__(self): |
|
45 |
|
|
|
46 | h.close() | |
|
47 | getattr(h, "close_all", lambda : None)() | |
|
46 | if self.urlopener: | |
|
47 | for h in self.urlopener.handlers: | |
|
48 | h.close() | |
|
49 | getattr(h, "close_all", lambda : None)() | |
|
48 | 50 | |
|
49 | 51 | def url(self): |
|
50 | 52 | return self.path |
General Comments 0
You need to be logged in to leave comments.
Login now