Skip to content

Commit

Permalink
Merge pull request #201 from Anderseta/patch-2
Browse files Browse the repository at this point in the history
Avoiding the error - ValueError: invalid literal for int() with base 10
  • Loading branch information
martinrusev authored Jun 29, 2021
2 parents 994de58 + 97bd77f commit c15838f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imbox/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def parse_attachment(message_part):
s_name = name.rstrip('*').split("*")
if s_name[0] == 'filename':
# If this is a split file name - use the number after the * as an index to insert this part
if len(s_name) > 1:
if len(s_name) > 1 and s_name[1] != '':
filename_parts.insert(int(s_name[1]),value[1:-1] if value.startswith('"') else value)
else:
filename_parts.insert(0,value[1:-1] if value.startswith('"') else value)
Expand Down

0 comments on commit c15838f

Please sign in to comment.