Permalink
Browse files

Clean up if/else's into elifs.

  • Loading branch information...
sjl committed Sep 25, 2011
1 parent c84626d commit beb0e1a7dbce363654a2d0bf651381f4672029f5
Showing with 10 additions and 12 deletions.
  1. +10 −12 growl.py
View
@@ -179,12 +179,11 @@ def notify_public_message_or_action(prefix, message, highlighted):
else:
if highlighted:
notify_highlighted_message(prefix, message)
- else:
- if weechat.config_get_plugin("show_public_message") == "on":
- growl_notify(
- 'Public',
- 'Public Message',
- '{0}: {1}'.format(prefix, message))
+ elif weechat.config_get_plugin("show_public_message") == "on":
+ growl_notify(
+ 'Public',
+ 'Public Message',
+ '{0}: {1}'.format(prefix, message))
def notify_private_message_or_action(prefix, message, highlighted):
'''Notify on private message or action.'''
@@ -203,12 +202,11 @@ def notify_private_message_or_action(prefix, message, highlighted):
else:
if highlighted:
notify_highlighted_message(prefix, message)
- else:
- if weechat.config_get_plugin("show_private_message") == "on":
- growl_notify(
- 'Private',
- 'Private Message',
- '{0}: {1}'.format(prefix, message))
+ elif weechat.config_get_plugin("show_private_message") == "on":
+ growl_notify(
+ 'Private',
+ 'Private Message',
+ '{0}: {1}'.format(prefix, message))
def notify_public_action_message(prefix, message, highlighted):
'''Notify on public action message.'''

0 comments on commit beb0e1a

Please sign in to comment.