Skip to content
Snippets Groups Projects
Commit 7b4b66f6 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Always pass an int as percentage in gauge_update()

There were cases where the parameter was of type long and this raises
exceptions in newer versions of the python-dialog.
parent 64456987
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,10 @@ class GaugeOutput(Output):
self.parent.index = dest
self.parent.percent = self.parent.index * 100 // self.parent.size
# In newer implementations of python dialog the gauge_update()
# function will raise an exception if the value is not an int.
self.parent.percent = int(self.parent.percent)
postfix = self.template[self.bar_type] % self.parent.__dict__
msg = "%s %s" % (self.parent.msg, postfix)
self.parent.d.gauge_update(self.parent.percent, msg,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment