##// END OF EJS Templates
statichttprepo: implement __enter__ and __exit__ on httprangeheader...
Gregory Szorc -
r27705:2380889f default
parent child Browse files
Show More
@@ -35,6 +35,13 b' class httprangereader(object):'
35 35 self.pos = 0
36 36 self.opener = opener
37 37 self.name = url
38
39 def __enter__(self):
40 return self
41
42 def __exit__(self, exc_type, exc_value, traceback):
43 self.close()
44
38 45 def seek(self, pos):
39 46 self.pos = pos
40 47 def read(self, bytes=None):
General Comments 0
You need to be logged in to leave comments. Login now