Skip to content

Commit

Permalink
fix pick buglet
Browse files Browse the repository at this point in the history
  • Loading branch information
pjz committed Dec 6, 2023
1 parent 5c098d0 commit 337c188
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mhi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import time
import email
import shutil
import string
import imaplib
import smtplib
import tempfile
Expand Down Expand Up @@ -716,7 +715,7 @@ def _consolidate(data):
str_list.append(f'{ilist[0]}-{ilist[-1]}')
else:
str_list.append(f'{ilist[0]}')
result = ','.join(str_list)
result = ','.join(str_list) or '0'
_debug(lambda: f"consolidate out: {result}")
return result

Expand All @@ -743,7 +742,7 @@ def pick(folder, arglist):
if data:
msglist = []
for m in data:
msglist += [int(i) for i in m.split()]
msglist.extend(int(i) for i in m.split())
print(_consolidate(msglist))
else:
print("0")
Expand Down

0 comments on commit 337c188

Please sign in to comment.