summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hahn <hahn@univention.de>2020-04-20 09:54:52 +0200
committerPhilipp Hahn <hahn@univention.de>2020-08-06 08:50:37 +0200
commit22f2ba37ae3a03a7988e3d744b06a92bb7824e0a (patch)
treee31afdee0ab4b8bbe832215627abcbc82f04c6ee
parentb6ad44257eeaed6d945390b6f02f614b35f7d30f (diff)
downloadlibvirt-python-22f2ba37ae3a03a7988e3d744b06a92bb7824e0a.tar.gz
sanitytest: Use str.startswith() instead of str[0]
Signed-off-by: Philipp Hahn <hahn@univention.de>
-rw-r--r--sanitytest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sanitytest.py b/sanitytest.py
index a295fac..efe46a9 100644
--- a/sanitytest.py
+++ b/sanitytest.py
@@ -94,7 +94,7 @@ gottypes = [] # type: List[str]
gotfunctions = {"libvirt": []} # type: Dict[str, List[str]]
for name in dir(libvirt):
- if name[0] == '_':
+ if name.startswith('_'):
continue
thing = getattr(libvirt, name)
# Special-case libvirtError to deal with python 2.4 difference
@@ -119,7 +119,7 @@ for enum in wantenums:
for klassname in gottypes:
klassobj = getattr(libvirt, klassname)
for name in dir(klassobj):
- if name[0] == '_':
+ if name.startswith('_'):
continue
if name == 'c_pointer':
continue