summaryrefslogtreecommitdiffstats
path: root/py3status/modules
diff options
context:
space:
mode:
authorrixx <rixx-git@cutebit.de>2015-03-17 22:34:00 +0100
committerrixx <rixx-git@cutebit.de>2015-03-17 22:34:00 +0100
commit2d021f0daf724bc165ec903daa0c456048497a79 (patch)
tree977f9d5008f416347c51596042736921ec1aafdc /py3status/modules
parent374fd321e29a40f8e00a7d4604f10c88495279fe (diff)
format string instead of strange string replace
Diffstat (limited to 'py3status/modules')
-rw-r--r--py3status/modules/imap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/py3status/modules/imap.py b/py3status/modules/imap.py
index 9b5aa5d..63e8665 100644
--- a/py3status/modules/imap.py
+++ b/py3status/modules/imap.py
@@ -19,7 +19,7 @@ class Py3status:
hide_if_zero = False
imap_server = '<IMAP_SERVER>'
mailbox = 'INBOX'
- name = 'Mail: %unseen'
+ name = 'Mail: {unseen}'
new_mail_color = ''
password = '<PASSWORD>'
port = '993'
@@ -40,7 +40,7 @@ class Py3status:
response['full_text'] = mail_count
elif mail_count != 0:
response['color'] = self.new_mail_color
- response['full_text'] = self.name.replace('%unseen', str(mail_count))
+ response['full_text'] = self.name.format(unseen=mail_count)
else:
response['color'] = ''
if self.hide_if_zero: