File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed
Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " vcon"
3- version = " 0.3.8 "
3+ version = " 0.3.9 "
44description = " The vCon library"
55authors = [" Thomas McCarthy-Howe <ghostofbasho@gmail.com>" ]
66license = " MIT"
Original file line number Diff line number Diff line change 55
66setup (
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" ,
Original file line number Diff line number Diff 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" )
You can’t perform that action at this time.
0 commit comments