Permalink
Browse files

Adds a flush() method to the fake iostreams

  • Loading branch information...
1 parent 5f5f5db commit 97ea1937d5382b5e6e2ffb660ccb2f2bf2e6ce60 @kurtiss committed Aug 10, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 shrapnel/command.py
View
@@ -202,10 +202,16 @@ def filter(self, record):
class _NullDescriptor(object):
def write(self, value):
pass
+
+ def flush(self):
+ pass
class _LoggingDescriptor(object):
def __init__(self, logger):
self.logger = logger
def write(self, data):
- self.logger(data)
+ self.logger(data)
+
+ def flush(self):
+ self.logger.flush()

0 comments on commit 97ea193

Please sign in to comment.