Skip to content

Commit

Permalink
fixed compatibility issue
Browse files Browse the repository at this point in the history
  • Loading branch information
PointlessUser committed Jun 29, 2023
1 parent f40e7a9 commit a6ea21a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mecsimcalc/text_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def string_to_file(
raise TypeError("text must be a string")

# Remove the file extension from the filename if it exists
filename.removesuffix(".txt")
if filename.endswith(".txt"):
filename = filename[:-4]

# Encode the text
encoded_text = base64.b64encode(text.encode()).decode()
Expand Down

0 comments on commit a6ea21a

Please sign in to comment.