pop-ups: avoid exceptions with old protobuf libs

reverse() doesn't exist on old protobuf libs.
This commit is contained in:
Gustavo Iñiguez Goia 2023-10-13 22:50:26 +02:00
parent 177d67d0a6
commit 4493c86bc3
Failed to generate hash of commit

View file

@ -463,7 +463,11 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
spaces = " "
indicator = ""
con.process_tree.reverse()
try:
# reverse() doesn't exist on old protobuf libs.
con.process_tree.reverse()
except:
pass
for path in con.process_tree:
tree = "{0}<p>│{1}\t{2}{3}{4}</p>".format(tree, path.value, spaces, indicator, path.key)
spaces += "&nbsp;" * 4