From 9ce239540554716a52e3f29c9eada56b66b89c4c Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 19 Jan 2013 18:40:44 +0100 Subject: [PATCH] Minor refactoring --- lib/core/target.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/core/target.py b/lib/core/target.py index 8da09de62..eb1115705 100644 --- a/lib/core/target.py +++ b/lib/core/target.py @@ -506,16 +506,14 @@ def initTargetEnv(): _setDBMS() if conf.data: - kb.postSpaceToPlus = '+' in conf.data + class _(unicode): + pass - if re.search(r'%[0-9a-f]{2}', conf.data, re.I): - class _(unicode): - pass - original = conf.data - conf.data = _(urldecode(conf.data)) - setattr(conf.data, UNENCODED_ORIGINAL_VALUE, original) - else: - conf.data = urldecode(conf.data) + original = conf.data + conf.data = _(urldecode(conf.data)) + setattr(conf.data, UNENCODED_ORIGINAL_VALUE, original) + + kb.postSpaceToPlus = '+' in original def setupTargetEnv(): _createTargetDirs()