Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
small bug when running Pinkie on Py3.2; will use an alternate clearin…
Browse files Browse the repository at this point in the history
…g method
  • Loading branch information
LilianaKinsley committed Apr 6, 2015
1 parent c7ac687 commit 09b7746
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/bestpony.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ def is_best_pony(phenny, input):
# double check that more_nicks is set to false before we start
more_nicks = False
# clear the channel_nicks list and start fresh
channel_nicks.clear()
# if we're running 3.3 or later, we can use .clear(), otherwise it raises an attribute error
try:
channel_nicks.clear()
except AttributeError:
channel_nicks = []
# now send the NAMES command for this channel; we need to send a raw command to the server, hence the "write" function
# to save time, we are only asking for this channel, not all the nicks the bot can see
if phenny.config.debug:
Expand Down

0 comments on commit 09b7746

Please sign in to comment.