mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-03 08:21:58 +03:00
sanitytest: Use str.startswith() instead of str[0]
Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
@ -94,7 +94,7 @@ gottypes = [] # type: List[str]
|
|||||||
gotfunctions = {"libvirt": []} # type: Dict[str, List[str]]
|
gotfunctions = {"libvirt": []} # type: Dict[str, List[str]]
|
||||||
|
|
||||||
for name in dir(libvirt):
|
for name in dir(libvirt):
|
||||||
if name[0] == '_':
|
if name.startswith('_'):
|
||||||
continue
|
continue
|
||||||
thing = getattr(libvirt, name)
|
thing = getattr(libvirt, name)
|
||||||
# Special-case libvirtError to deal with python 2.4 difference
|
# Special-case libvirtError to deal with python 2.4 difference
|
||||||
@ -119,7 +119,7 @@ for enum in wantenums:
|
|||||||
for klassname in gottypes:
|
for klassname in gottypes:
|
||||||
klassobj = getattr(libvirt, klassname)
|
klassobj = getattr(libvirt, klassname)
|
||||||
for name in dir(klassobj):
|
for name in dir(klassobj):
|
||||||
if name[0] == '_':
|
if name.startswith('_'):
|
||||||
continue
|
continue
|
||||||
if name == 'c_pointer':
|
if name == 'c_pointer':
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user