better code: list[2:][0] -> list[2]

This commit is contained in:
Yann Leboulanger 2008-08-26 12:08:36 +00:00
parent 26334c7064
commit 20ed561650
1 changed files with 2 additions and 2 deletions

View File

@ -523,10 +523,10 @@ class GajimRemote:
self.arguments += ['']*(len(args)-i) self.arguments += ['']*(len(args)-i)
def handle_uri(self): def handle_uri(self):
if not sys.argv[2:][0].startswith('xmpp:'): if not sys.argv[2].startswith('xmpp:'):
send_error(_('Wrong uri')) send_error(_('Wrong uri'))
sys.argv[2] = sys.argv[2][5:] sys.argv[2] = sys.argv[2][5:]
uri = sys.argv[2:][0] uri = sys.argv[2]
if not '?' in uri: if not '?' in uri:
self.command = sys.argv[1] = 'open_chat' self.command = sys.argv[1] = 'open_chat'
return return