Skip to content

Commit

Permalink
fix(modules,contrib,thunderbird): correctly use hex and A1 key
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbadstuebner committed Feb 28, 2024
1 parent 65ee40b commit 1e289f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bumblebee_status/modules/contrib/thunderbird.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __getThunderbirdStream(self):
cmd = (
"find "
+ self.__home
+ " -name '*.msf' -exec grep -REo 'A2=[0-9]' {} + | grep"
+ " -name '*.msf' -exec grep -REo '\^A1=[0-9a-fA-F]+)' {} + | grep"
)
for inbox in self.__inboxes:
cmd += " -e {}".format(inbox)
Expand All @@ -74,9 +74,9 @@ def __getThunderbirdStream(self):
def __getUnreadMessagesByInbox(self, stream):
unread = {}
for line in stream:
entry = line.split(":A2=")
entry = line.split(":^A1=")
inbox = entry[0]
count = entry[1]
count = str(int(entry[1][:-1], 16))
unread[inbox] = count

return unread
Expand Down

0 comments on commit 1e289f9

Please sign in to comment.