From c29d2f62879293b052fa62f321a96d891c484abf Mon Sep 17 00:00:00 2001 From: naelsondouglas Date: Tue, 2 Nov 2021 22:15:58 -0300 Subject: [PATCH] removed a default mutable argument pitfall --- task.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/task.py b/task.py index 8fdab2e4..81079b55 100644 --- a/task.py +++ b/task.py @@ -551,7 +551,9 @@ def get_panel_pid(): return None -def HttpGet(url, timeout=6, headers={}): +def HttpGet(url, timeout=6, headers=None): + if not headers: + headers = {} if sys.version_info[0] == 2: try: import urllib2