diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-12-18 08:52:42 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-02-08 17:29:54 +0100 |
commit | cf6c63456b47118a7f0fbb917c220c0a483db6de (patch) | |
tree | c17387899208582087074bc5685b8328b76b5866 /scripts/qmp/qmp-shell | |
parent | 291928a80f39670929fcce222acd5e21d1434692 (diff) | |
download | qemu-cf6c63456b47118a7f0fbb917c220c0a483db6de.zip qemu-cf6c63456b47118a7f0fbb917c220c0a483db6de.tar.gz qemu-cf6c63456b47118a7f0fbb917c220c0a483db6de.tar.bz2 |
scripts/qmp: Use Python 2.6 "except E as ..." syntax
PEP 8 calls for it, because it's forward compatible with Python 3.
Supported since Python 2.6, which we require (commit fec2103).
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <1450425164-24969-3-git-send-email-armbru@redhat.com>
Diffstat (limited to 'scripts/qmp/qmp-shell')
-rwxr-xr-x | scripts/qmp/qmp-shell | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index fa39bf0..7a402ed 100755 --- a/scripts/qmp/qmp-shell +++ b/scripts/qmp/qmp-shell @@ -240,7 +240,7 @@ class QMPShell(qmp.QEMUMonitorProtocol): def _execute_cmd(self, cmdline): try: qmpcmd = self.__build_cmd(cmdline) - except Exception, e: + except Exception as e: print 'Error while parsing command line: %s' % e print 'command format: <command-name> ', print '[arg-name1=arg1] ... [arg-nameN=argN]' |