From 1d647d49b3a2b5fd52ae7b0904879f6087976eca Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Mon, 14 Dec 2009 19:33:50 -0500 Subject: [PATCH] Remove ternary operators This removes complains by python-support on lenny. --- ceo/ops.py | 5 ++++- ceo/urwid/renew.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ceo/ops.py b/ceo/ops.py index 66a8566..4d383e9 100644 --- a/ceo/ops.py +++ b/ceo/ops.py @@ -1,7 +1,10 @@ import os, syslog, grp def response_message(response, status, message): - priority = syslog.LOG_ERR if status else syslog.LOG_INFO + if status: + priority = syslog.LOG_ERR + else: + priority = syslog.LOG_INFO syslog.syslog(priority, message) msg = response.messages.add() msg.status = status diff --git a/ceo/urwid/renew.py b/ceo/urwid/renew.py index 75565b3..2734cef 100644 --- a/ceo/urwid/renew.py +++ b/ceo/urwid/renew.py @@ -67,7 +67,10 @@ class EmailPage(WizardPanel): ] def activate(self): cfwd = members.current_email(self.state['userid']) - self.state['old_forward'] = cfwd if cfwd else '' + if cfwd: + self.state['old_forward'] = cfwd + else: + self.state['old_forward'] = '' self.email.set_edit_text(self.state['old_forward']) def check(self): fwd = self.email.get_edit_text().strip().lower()