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 2a54381 commit 90cca8aCopy full SHA for 90cca8a
tests/test.py
@@ -20,8 +20,10 @@ def upload_file(file_path):
20
21
if basename.endswith('.jar'):
22
content_type = 'application/java-archive'
23
- else:
+ elif basename.endswith('.py'):
24
content_type = 'application/x-python'
25
+ else:
26
+ raise ValueError("Unexpected file type: {}. Expected .jar or .py file.".format(basename))
27
28
key = Key(bucket, '{}/{}'.format(os.environ['S3_PREFIX'], basename))
29
key.metadata = {'Content-Type': content_type}
0 commit comments