Include module for desktop build

This commit is contained in:
Ruud
2012-09-09 17:29:09 +02:00
parent 89426d75ab
commit 36f653f65b
88 changed files with 9967 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
# Copyright (c) 2005-2010 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
# This little file makes it so that we can use "log.msg()" and the contents
# get logged to the Twisted logger if present, else to the Python Standard
# Library logger.
import warnings
warnings.warn("deprecated", DeprecationWarning)
try:
from twisted.python import log
log # http://divmod.org/trac/ticket/1499
except ImportError:
import logging
class MinimalLogger:
def msg(self, m):
logging.log(0, m)
log = MinimalLogger()