summaryrefslogtreecommitdiffstats
path: root/tests/basic.py
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2006-03-28 14:41:04 +0000
committerDaniel Veillard <veillard@redhat.com>2006-03-28 14:41:04 +0000
commit1027aa871cf478a54d77088199da8caabacbe3a0 (patch)
treeefdb320396183d0cb7fd81f38e2f3ca110cef1f7 /tests/basic.py
parent86dda3bcc733bd0cbb1b0c50417d677fe9ad2a98 (diff)
downloadlibvirt-python-v6-1027aa871cf478a54d77088199da8caabacbe3a0.tar.gz
libvirt-python-v6-1027aa871cf478a54d77088199da8caabacbe3a0.tar.xz
libvirt-python-v6-1027aa871cf478a54d77088199da8caabacbe3a0.zip
* python/libvir.c: call the initialize entry point
* src/libvirt_sym.version: add initialize entry point * src/libvirt.c: make sure we always initialize the lib * python/tests/*.py: start updating exemple for exception handling as pointed by Jim Meyering Daniel
Diffstat (limited to 'tests/basic.py')
-rwxr-xr-xtests/basic.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/basic.py b/tests/basic.py
index b6f8831..c6dec81 100755
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -14,8 +14,9 @@ if conn == None:
# print conn
-dom0 = conn.lookupByName("Domain-0")
-if dom0 == None:
+try:
+ dom0 = conn.lookupByName("Domain-0")
+except:
print 'Failed to find the main domain'
sys.exit(1)