From df3d65c832878e2daa900131e85b22cefaa24cd7 Mon Sep 17 00:00:00 2001 From: Sven Festersen Date: Sun, 4 Aug 2019 19:49:10 +0200 Subject: [PATCH] Change to single quotes. --- mopidy_iris/core.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mopidy_iris/core.py b/mopidy_iris/core.py index 9731b099..21ae087d 100755 --- a/mopidy_iris/core.py +++ b/mopidy_iris/core.py @@ -904,14 +904,14 @@ class IrisCore(pykka.ThreadingActor): http_client = tornado.httpclient.HTTPClient() # Build headers dict if additional headers are given headers = None - if "additional_headers" in command: - d = command["additional_headers"].split("\n") - lines = list(filter(lambda x: x.find(":") > 0, d)) - fields = [(x.split(":", 1)[0].strip().lower(), x.split(":", 1)[1].strip()) for x in lines] + if 'additional_headers' in command: + d = command['additional_headers'].split('\n') + lines = list(filter(lambda x: x.find(':') > 0, d)) + fields = [(x.split(':', 1)[0].strip().lower(), x.split(':', 1)[1].strip()) for x in lines] headers = dict(fields) if (command['method'] == 'POST'): - if "content-type" in headers and headers["content-type"].lower() != "application/json": + if 'content-type' in headers and headers['content-type'].lower() != 'application/json': post_data = command['post_data'] else: post_data = json.dumps(command['post_data'])