aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús Eduardo <heckyel@hyperbola.info>2018-01-17 13:01:41 -0500
committerJesús Eduardo <heckyel@hyperbola.info>2018-01-17 13:01:41 -0500
commit00e0eb6de44a7ae7cca54de304d9c0c355f80964 (patch)
tree4cdcaa2aaebbe1f6946af53548be3e03afa69dd4
parent8a8422849295fd3188dcecf15069dfbedd85645f (diff)
downloadlibrevideoconverter-00e0eb6de44a7ae7cca54de304d9c0c355f80964.tar.lz
librevideoconverter-00e0eb6de44a7ae7cca54de304d9c0c355f80964.tar.xz
librevideoconverter-00e0eb6de44a7ae7cca54de304d9c0c355f80964.zip
pep8 en lvc/windows/exelogging.py
-rw-r--r--lvc/windows/exelogging.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/lvc/windows/exelogging.py b/lvc/windows/exelogging.py
index a63c836..9f3e0c2 100644
--- a/lvc/windows/exelogging.py
+++ b/lvc/windows/exelogging.py
@@ -10,14 +10,16 @@ import tempfile
from StringIO import StringIO
from logging.handlers import RotatingFileHandler
+
class ApatheticRotatingFileHandler(RotatingFileHandler):
"""The whole purpose of this class is to prevent rotation errors
from percolating up into stdout/stderr and popping up a dialog
that's not particularly useful to users or us.
"""
def doRollover(self):
- # If you shut down LibreVideoConverter then start it up again immediately
- # afterwards, then we get in this squirrely situation where
+ # If you shut down LibreVideoConverter then
+ # start it up again immediately afterwards,
+ # then we get in this squirrely situation where
# the log is opened by another process. We ignore the
# exception, but make sure we have an open file. (bug #11228)
try:
@@ -41,8 +43,9 @@ class ApatheticRotatingFileHandler(RotatingFileHandler):
def handleError(self, record):
# ignore logging errors that occur rather than printing them to
# stdout/stderr which isn't helpful to us
-
pass
+
+
class AutoLoggingStream(StringIO):
"""Create a stream that intercepts write calls and sends them to
the log.
@@ -63,6 +66,8 @@ class AutoLoggingStream(StringIO):
self.logging_callback(self.prefix + data)
FORMAT = "%(asctime)s %(levelname)-8s %(name)s: %(message)s"
+
+
def setup_logging():
"""Setup logging for when we're running inside a windows exe.