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