You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by ni...@apache.org on 2021/12/19 00:04:49 UTC

[incubator-heron] 01/01: Updated to fix missing anticrlf dependency.

This is an automated email from the ASF dual-hosted git repository.

nicknezis pushed a commit to branch nicknezis/anticrlf-dependency-fix
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 143768b23d8ecc24a04bf5686e9933fa180e4cbf
Author: Nicholas Nezis <ni...@gmail.com>
AuthorDate: Sat Dec 18 19:04:29 2021 -0500

    Updated to fix missing anticrlf dependency.
---
 heron/shell/src/python/BUILD                       | 1 +
 heron/shell/src/python/handlers/downloadhandler.py | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/heron/shell/src/python/BUILD b/heron/shell/src/python/BUILD
index 52cf78d..106c0a3 100644
--- a/heron/shell/src/python/BUILD
+++ b/heron/shell/src/python/BUILD
@@ -6,6 +6,7 @@ pex_library(
         ["**/*.py"],
     ),
     reqs = [
+        "logging-formatter-anticrlf==1.2",
         "requests==2.12.3",
         "tornado==4.5.3",
     ],
diff --git a/heron/shell/src/python/handlers/downloadhandler.py b/heron/shell/src/python/handlers/downloadhandler.py
index 806f552..3186253 100644
--- a/heron/shell/src/python/handlers/downloadhandler.py
+++ b/heron/shell/src/python/handlers/downloadhandler.py
@@ -23,6 +23,7 @@
 import os
 import logging
 import tornado.web
+import anticrlf
 
 from heron.shell.src.python import utils
 
@@ -35,7 +36,7 @@ class DownloadHandler(tornado.web.RequestHandler):
     """ get method """
 
     handler = logging.StreamHandler()
-    handler.setFormatter(logging.Formatter('%(levelname)s:%(name)s:%(message)s'))
+    handler.setFormatter(anticrlf.LogFormatter('%(levelname)s:%(name)s:%(message)s'))
     logger = logging.getLogger(__name__)
     logger.addHandler(handler)
     logger.setLevel(logging.DEBUG)