From 2daca4af6e162dfbbe68d82032125ae76cdc21ca Mon Sep 17 00:00:00 2001 From: Wirawan Purwanto Date: Fri, 19 Apr 2013 16:46:09 -0400 Subject: [PATCH] * tee_output: Allow None to be given in the `files' argument, which stands for a null file. --- file/tee.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/file/tee.py b/file/tee.py index 74c2c7b..5999028 100644 --- a/file/tee.py +++ b/file/tee.py @@ -30,7 +30,9 @@ class tee_output(object): auto_close = [] mode = opts.get("mode", "w") for f in files: - if isinstance(f, basestring): + if f == None: + pass + elif isinstance(f, basestring): F = open(f, mode=mode) fd.append(F) auto_close.append(True)