summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvsl-iil <36484938+vsl-iil@users.noreply.github.com>2023-08-26 19:24:24 +0000
committerGitHub <noreply@github.com>2023-08-26 19:24:24 +0000
commit32116608964af22b3143a1044bb152a2af853d64 (patch)
tree34031041f1daae31023b3771d5b0c19f3cacfd26
parent44c43f9e34e10fab4770de367ca4e812f2c3ead8 (diff)
Fixed float(total_folders_text) ValueError
Seems like Nicotine+ 3.2.9 added a non-breaking space to folders count. It caused an error when trying to convert string to float.
-rw-r--r--__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/__init__.py b/__init__.py
index f864b75..1bf1b16 100644
--- a/__init__.py
+++ b/__init__.py
@@ -77,7 +77,7 @@ class Plugin(BasePlugin):
try:
total_size_text = self.frame.userbrowse.pages[user].share_size_label.get_text()
total_folders_text_temp = self.frame.userbrowse.pages[user].num_folders_label.get_text()
- total_folders_text = total_folders_text_temp.replace(",","")
+ total_folders_text = total_folders_text_temp.replace(",","").replace("\xa0", "")
info_box_text = self.frame.userbrowse.pages[user].info_bar.label.get_text()
progressbar_fraction = self.frame.userbrowse.pages[user].progress_bar.get_fraction()
@@ -250,4 +250,4 @@ class Plugin(BasePlugin):
self.probed[user] = 'processed'
else:
# We already dealt with this user.
- pass \ No newline at end of file
+ pass