Remove ternary operators
authorMichael Spang <mspang@csclub.uwaterloo.ca>
Tue, 15 Dec 2009 00:33:50 +0000 (19:33 -0500)
committerMichael Spang <mspang@csclub.uwaterloo.ca>
Tue, 15 Dec 2009 00:34:16 +0000 (19:34 -0500)
This removes complains by python-support on lenny.

ceo/ops.py
ceo/urwid/renew.py

index 66a8566..4d383e9 100644 (file)
@@ -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
index 75565b3..2734cef 100644 (file)
@@ -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()