src: fix qa issues

This commit is contained in:
Maciej Barć 2020-09-16 18:02:17 +02:00
parent ea1bb114e5
commit 8066f548d0
No known key found for this signature in database
GPG Key ID: 031C9FE65BED714A

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
Original author: XGQT Original author: XGQT
Licensed under the ISC License Licensed under the ISC License
@ -13,12 +14,13 @@ How to use:
- run this script - run this script
""" """
import os import os
import os.path import os.path
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
metadatas = [ METADATAS = [
os.path.join(dp, f) os.path.join(dp, f)
for dp, _, filenames in os.walk(".") for dp, _, filenames in os.walk(".")
for f in filenames if os.path.splitext(f)[1] == '.xml' for f in filenames if os.path.splitext(f)[1] == '.xml'
@ -26,7 +28,7 @@ metadatas = [
if __name__ == '__main__': if __name__ == '__main__':
for metadata in metadatas: for metadata in METADATAS:
try: try:
_, cat, pkg, _ = metadata.split("/") _, cat, pkg, _ = metadata.split("/")
print("Package: %s/%s" % (cat, pkg)) print("Package: %s/%s" % (cat, pkg))