diff options
author | mathieui <mathieui@mathieui.net> | 2012-04-18 00:10:10 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2012-04-18 00:10:10 +0200 |
commit | 22cd80feb52d539e8aef5a252c75f75cf1f04c5b (patch) | |
tree | e0f663a5c3bddc4a89b0935a1245e9fdb14e21a0 | |
parent | 54a43ab13209721129b961cc7dfb441a70cf7cb5 (diff) | |
download | poezio-22cd80feb52d539e8aef5a252c75f75cf1f04c5b.tar.gz poezio-22cd80feb52d539e8aef5a252c75f75cf1f04c5b.tar.bz2 poezio-22cd80feb52d539e8aef5a252c75f75cf1f04c5b.tar.xz poezio-22cd80feb52d539e8aef5a252c75f75cf1f04c5b.zip |
Refactor command_win a bit
-rw-r--r-- | src/core.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core.py b/src/core.py index c36531c0..13eea3e1 100644 --- a/src/core.py +++ b/src/core.py @@ -1621,14 +1621,14 @@ class Core(object): """ /win <number> """ - args = arg.split() - if len(args) != 1: + arg = arg.strip() + if not arg: self.command_help('win') return try: - nb = int(args[0]) + nb = int(arg.split()[0]) except ValueError: - nb = arg.strip() + nb = arg if self.current_tab().nb == nb: return self.previous_tab_nb = self.current_tab().nb |