mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Replace if with try statement
This commit is contained in:
parent
ed00dccd5a
commit
d6d4ec5c98
1 changed files with 6 additions and 4 deletions
|
@ -160,10 +160,12 @@ class RedditNetwork(Network):
|
||||||
while '' in cmd:
|
while '' in cmd:
|
||||||
cmd.remove('')
|
cmd.remove('')
|
||||||
cmd[0] = cmd[0].strip(' \t\n\r')
|
cmd[0] = cmd[0].strip(' \t\n\r')
|
||||||
if cmd[1]:
|
try:
|
||||||
if cmd[0] == u'tip' and cmd[1][0:3] == u'/u/':
|
if cmd[0] == u'tip' and cmd[1][0:3] == u'/u/':
|
||||||
log_info("Subbing out /u/ from username")
|
log_info("Subbing out /u/ from username")
|
||||||
cmd[1] = cmd[1][3:]
|
cmd[1] = cmd[1][3:]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
log_info('Found command from %s: %s' % (link.identity(), str(cmd)))
|
log_info('Found command from %s: %s' % (link.identity(), str(cmd)))
|
||||||
if self.on_command:
|
if self.on_command:
|
||||||
self.on_command(link,cmd)
|
self.on_command(link,cmd)
|
||||||
|
|
Loading…
Reference in a new issue