pekka.panula@netservant.fi
2008-Sep-17 10:18 UTC
[Fedora-xen] virt-manager 0.6.0 under CentOS 5.2 (64-bit) gives Python syntax error (invalid syntax) with domain.py, line 669
Hi I updated virt-manager 0.6.0 and python-virtinst 0.400.0 and when i am trying to start virt-manager i am getting Python syntax error: --------------------8<-------------- Traceback (most recent call last): File "/usr/share/virt-manager/virt-manager.py", line 346, in ? main() File "/usr/share/virt-manager/virt-manager.py", line 287, in main from virtManager.engine import vmmEngine File "/usr/share/virt-manager/virtManager/engine.py", line 31, in ? from virtManager.connection import vmmConnection File "/usr/share/virt-manager/virtManager/connection.py", line 36, in ? from virtManager.domain import vmmDomain File "/usr/share/virt-manager/virtManager/domain.py", line 669 finally: ^ SyntaxError: invalid syntax --------------------8<-------------- CentOS using default python (RPM = python-2.4.3-21.el5): Python 2.4.3 (#1, May 24 2008, 13:57:05) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2 My python skills are somewhat non-existent so can anyone give any help how to fix this? Terveisin/Regards, Pekka Panula, Net Servant Oy
Daniel P. Berrange
2008-Sep-17 10:35 UTC
Re: [Fedora-xen] virt-manager 0.6.0 under CentOS 5.2 (64-bit) gives Python syntax error (invalid syntax) with domain.py, line 669
On Wed, Sep 17, 2008 at 01:18:34PM +0300, pekka.panula@netservant.fi wrote:> Hi > > I updated virt-manager 0.6.0 and python-virtinst 0.400.0 and when i am > trying to start virt-manager i am getting Python syntax error: > --------------------8<-------------- > Traceback (most recent call last): > File "/usr/share/virt-manager/virt-manager.py", line 346, in ? > main() > File "/usr/share/virt-manager/virt-manager.py", line 287, in main > from virtManager.engine import vmmEngine > File "/usr/share/virt-manager/virtManager/engine.py", line 31, in ? > from virtManager.connection import vmmConnection > File "/usr/share/virt-manager/virtManager/connection.py", line 36, in ? > from virtManager.domain import vmmDomain > File "/usr/share/virt-manager/virtManager/domain.py", line 669 > finally: > ^ > SyntaxError: invalid syntax > --------------------8<--------------Looks like a python 2.5-ism crept into the codebase - there''s a try, except, finally all together. For python 2.4 you can either a try + except or a try + finally, but not both. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|