Skip to content

Commit 39d650b

Browse files
authored
Merge pull request #24 from vcon-dev/fix-inline-dialog
Bump version to 0.3.9
2 parents 3a403c3 + 7a383c1 commit 39d650b

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "vcon"
3-
version = "0.3.8"
3+
version = "0.3.9"
44
description = "The vCon library"
55
authors = ["Thomas McCarthy-Howe <ghostofbasho@gmail.com>"]
66
license = "MIT"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="vcon",
8-
version="0.3.8",
8+
version="0.3.9",
99
author="Thomas McCarthy-Howe",
1010
author_email="ghostofbasho@gmail.com",
1111
description="A package for working with vCon containers",

src/vcon/dialog.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,6 @@ def to_inline_data(self) -> None:
284284
:return: None
285285
:rtype: None
286286
"""
287-
# Ensure filename attribute exists
288-
if not hasattr(self, "filename"):
289-
self.filename = None
290-
291287
# Read the contents from the URL
292288
response = requests.get(self.url)
293289
if response.status_code == 200:
@@ -306,11 +302,9 @@ def to_inline_data(self) -> None:
306302
hashlib.sha256(raw_content).digest()
307303
).decode()
308304

309-
# Set the filename if not already provided
310-
if not self.filename:
311-
# Extract filename from URL, removing any query parameters
312-
url_path = self.url.split("?")[0]
313-
self.filename = url_path.split("/")[-1]
305+
# Set the filename if it doesn't exist
306+
if not hasattr(self, "filename"):
307+
self.filename = self.url.split("/")[-1]
314308

315309
# Remove the url since this is now inline data
316310
delattr(self, "url")

0 commit comments

Comments
 (0)