summaryrefslogtreecommitdiff
path: root/src/leap/util
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-07-19 11:35:27 -0300
committerTomás Touceda <chiiph@leap.se>2013-07-19 12:14:23 -0300
commit2b2505683f9dd91b6f2f8aeb1ac0798c975a53d6 (patch)
treeb641d44e2f4819ca0458f3754246c4314864a483 /src/leap/util
parent7ec29145b064afab312cb57e74dc33c38da1e3ea (diff)
Workaround segfault when emitting a signal with a None parameter
Also, support a response from requests be None in certain places.
Diffstat (limited to 'src/leap/util')
-rw-r--r--src/leap/util/request_helpers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/leap/util/request_helpers.py b/src/leap/util/request_helpers.py
index 350abfbd..74aaa06b 100644
--- a/src/leap/util/request_helpers.py
+++ b/src/leap/util/request_helpers.py
@@ -41,7 +41,7 @@ def get_content(request):
contents = ""
mtime = None
- if request.content and request.json:
+ if request and request.content and request.json:
if callable(request.json):
contents = json.dumps(request.json())
else: