From 8576dcda194e5afee507ba6843a3e88fbe1c69b6 Mon Sep 17 00:00:00 2001 From: jangsutsr Date: Wed, 24 Aug 2016 10:58:53 -0400 Subject: [PATCH] Remove legacy exception handling. --- awx/main/models/jobs.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/awx/main/models/jobs.py b/awx/main/models/jobs.py index 5df339186b..4709ab43c6 100644 --- a/awx/main/models/jobs.py +++ b/awx/main/models/jobs.py @@ -746,14 +746,11 @@ class Job(UnifiedJob, JobOptions): Hides fields marked as passwords in survey. ''' if self.survey_passwords: - try: - extra_vars = json.loads(self.extra_vars) - for key, value in self.survey_passwords.items(): - if key in extra_vars: - extra_vars[key] = value - return json.dumps(extra_vars) - except ValueError: - pass + extra_vars = json.loads(self.extra_vars) + for key, value in self.survey_passwords.items(): + if key in extra_vars: + extra_vars[key] = value + return json.dumps(extra_vars) else: return self.extra_vars