@@ -50,7 +50,7 @@ def _get(connection, attr, data, squeeze, download_path):
5050 adapt = attr .adapter .get if attr .adapter else lambda x : x
5151
5252 if attr .is_filepath :
53- return adapt ( str (extern .download_filepath (uuid .UUID (bytes = data ))[0 ]))
53+ return str ( adapt (extern .download_filepath (uuid .UUID (bytes = data ))[0 ]))
5454
5555 if attr .is_attachment :
5656 # Steps:
@@ -65,22 +65,22 @@ def _get(connection, attr, data, squeeze, download_path):
6565 if local_filepath .is_file ():
6666 attachment_checksum = _uuid if attr .is_external else hash .uuid_from_buffer (data )
6767 if attachment_checksum == hash .uuid_from_file (local_filepath , init_string = attachment_name + '\0 ' ):
68- return adapt ( str (local_filepath )) # checksum passed, no need to download again
68+ return str ( adapt (local_filepath )) # checksum passed, no need to download again
6969 # generate the next available alias filename
7070 for n in itertools .count ():
7171 f = local_filepath .parent / (local_filepath .stem + '_%04x' % n + local_filepath .suffix )
7272 if not f .is_file ():
7373 local_filepath = f
7474 break
7575 if attachment_checksum == hash .uuid_from_file (f , init_string = attachment_name + '\0 ' ):
76- return adapt ( str (f )) # checksum passed, no need to download again
76+ return str ( adapt (f )) # checksum passed, no need to download again
7777 # Save attachment
7878 if attr .is_external :
7979 extern .download_attachment (_uuid , attachment_name , local_filepath )
8080 else :
8181 # write from buffer
8282 safe_write (local_filepath , data .split (b"\0 " , 1 )[1 ])
83- return adapt ( str (local_filepath )) # download file from remote store
83+ return str ( adapt (local_filepath )) # download file from remote store
8484
8585 return adapt (uuid .UUID (bytes = data ) if attr .uuid else (
8686 blob .unpack (extern .get (uuid .UUID (bytes = data )) if attr .is_external else data , squeeze = squeeze )
0 commit comments