changeset 2686:248489d28118

Make a conditional a little bit more pretty. ;)
author Karol Nowak <grzywacz@sul.uni.lodz.pl>
date Thu, 16 Aug 2007 11:08:32 +0200
parents c960a907690e
children 701a36397035 da94375a625c b185b5b80d1b
files jabberbot/xmppbot.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/jabberbot/xmppbot.py	Thu Aug 16 01:56:51 2007 +0200
+++ b/jabberbot/xmppbot.py	Thu Aug 16 11:08:32 2007 +0200
@@ -84,10 +84,7 @@
             return extension in self.resources[resource]['supports']
         else:
             resource = self.max_prio_resource()
-            if resource:
-                return extension in resource['supports']
-            else:
-                return False
+            return resource and extension in resource['supports']
 
     def max_prio_resource(self):
         """Returns the resource (dict) with the highest priority