Enabled PDFDevice in the with statement (#88)
parent
e39800f14c
commit
d4118cf5e8
|
@ -15,6 +15,12 @@ class PDFDevice(object):
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<PDFDevice>'
|
return '<PDFDevice>'
|
||||||
|
|
||||||
|
def __enter__(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||||
|
self.close()
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue