summaryrefslogtreecommitdiff
path: root/pyasn1/debug.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyasn1/debug.py')
-rw-r--r--pyasn1/debug.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyasn1/debug.py b/pyasn1/debug.py
index cb21fb6..21d9e3c 100644
--- a/pyasn1/debug.py
+++ b/pyasn1/debug.py
@@ -15,7 +15,7 @@ flagMap = {
}
class Debug:
- defaultPrinter = sys.stderr.write
+ defaultPrinter = sys.stderr and sys.stderr.write or None
def __init__(self, *flags):
self._flags = flagNone
if not self.defaultPrinter: