From edc9da1226a6412089707acf2c2a91777cddc4f5 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 3 Jun 2013 15:14:56 +0200 Subject: [PATCH] Minor refactoring --- lib/request/connect.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/request/connect.py b/lib/request/connect.py index 0ba336730..f50e9fb33 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -291,11 +291,8 @@ class Connect(object): url = "%s?%s" % (url, get) requestMsg += "?%s" % get - if conf.method == HTTPMETHOD.POST and not post: - for place in (PLACE.POST,): - if place in conf.parameters: - post = conf.parameters[place] - break + if PLACE.POST in conf.parameters and not post and method in (None, HTTPMETHOD.POST): + post = conf.parameters[PLACE.POST] elif get: url = "%s?%s" % (url, get)