1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-04 04:59:37 +03:00
Commit Graph

9 Commits

Author SHA1 Message Date
74a78fa42c examples: Fix white space
indent by 4 spaces
one spaces around assignments

Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-05 07:43:02 +00:00
b801ff31fa examples: Replace sys.exit() with exit()
No need to import sys.

Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-05 07:43:02 +00:00
f496dc55ee examples: Cleanup imports
Break import into multiple lines as recommended by PEP-8

Move imports to top

Remove unused imports

Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-05 07:43:02 +00:00
06aba185a8 examples: Convert to ArgumentParser
Replace getopt() and hand-rolled-parser with argparse.ArgumentParser.

Fix wrong header comments copy-pasted from domstart.py

Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-05 07:43:02 +00:00
9cf539a2a8 examples: Add/fix PEP 484 type annotation
Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-05 07:43:02 +00:00
283e2bc693 examples: Fix connection error handling
libvirt.open*() does not return None but raises an exception

Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-04-20 13:21:55 +01:00
b22e4f2441 Drop support for python 2
python2 will be end of life by the time of the next
libvirt release. All our supported build targets, including
CentOS7, have a python3 build available.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-04 12:14:51 +00:00
3f4e32c6a1 examples: Invoke print("...") instead of print "..."
The 'print' method must be called as a function in python3,
ie with brackets.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-12-11 16:12:54 +00:00
34aa32ba8a Move python example programs into python/examples/ subdirectory
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-22 15:55:39 +00:00