You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/06/20 16:53:07 UTC

[airflow] 08/25: n Improved compatibility with Python 3.5+ - Convert signal.SIGTERM to int (#9207)

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

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 4c9b9e1d734efff640e8b7d2bb0287c835d39dfb
Author: Jiening Wen <ph...@phill84.org>
AuthorDate: Wed Jun 10 12:19:18 2020 +0200

    n Improved compatibility with Python 3.5+ - Convert signal.SIGTERM to int (#9207)
    
    Co-authored-by: Jiening Wen <ph...@Jienings-MacBook-Pro.local>
    (cherry picked from commit 1cf52da4ff4c58050273f7adafa787c60776c6e8)
---
 airflow/utils/helpers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/airflow/utils/helpers.py b/airflow/utils/helpers.py
index 05c6e4d..4913c4d 100644
--- a/airflow/utils/helpers.py
+++ b/airflow/utils/helpers.py
@@ -299,7 +299,7 @@ def reap_process_group(pgid, log, sig=signal.SIGTERM,
             # use sudo -n(--non-interactive) to kill the process
             if err.errno == errno.EPERM:
                 subprocess.check_call(
-                    ["sudo", "-n", "kill", "-" + str(sig)] + [str(p.pid) for p in children]
+                    ["sudo", "-n", "kill", "-" + str(int(sig))] + [str(p.pid) for p in children]
                 )
             else:
                 raise