We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e79d01 commit 00e107fCopy full SHA for 00e107f
tools/link.py
@@ -2829,13 +2829,8 @@ def move_file(src, dst):
2829
2830
2831
# Returns the subresource location for run-time access
2832
-def get_subresource_location(path, data_uri=None):
2833
- if data_uri is None:
2834
- data_uri = settings.SINGLE_FILE
2835
- if data_uri:
2836
- # if the path does not exist, then there is no data to encode
2837
- if not os.path.exists(path):
2838
- return ''
+def get_subresource_location(path):
+ if settings.SINGLE_FILE:
2839
data = base64.b64encode(utils.read_binary(path))
2840
return 'data:application/octet-stream;base64,' + data.decode('ascii')
2841
else:
0 commit comments