Skip to content

Commit

Permalink
printer as context manager
Browse files Browse the repository at this point in the history
  • Loading branch information
bwhmather committed Jan 23, 2015
1 parent 65900c5 commit c01bf60
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions linemode/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ def run_commands(self, commands):

def shutdown(self):
pass

def __enter__(self):
return self

def __exit__(self, exc_type, exc_value, exc_traceback):
self.shutdown()

0 comments on commit c01bf60

Please sign in to comment.