Skip to content

Commit f6d9930

Browse files
authored
fix: Python packaging error message was missing (#116)
Instead of returning the actual error message to the custom resource, we returned: ``` Internal error: 'CommandError' object has no attribute 'message' ``` Fixes #115
1 parent edce0fb commit f6d9930

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/package-python.lambda.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919

2020
class CommandError(Exception):
21-
pass
21+
def __init__(self, message):
22+
super().__init__(message)
23+
self.message = message
2224

2325

2426
def cancel_on_timeout(event, context):

test/default.integ.snapshot/Turbo-Layer-Test.assets.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@
105105
}
106106
}
107107
},
108-
"190116602f67fcba43a33629264da3211c4f9cc2ae688bdf0ee6d8c7e4ec48fd": {
108+
"ef31fc89d7ced5ea0cff316469a82711784a006d3ae7a037f2b2422969eafc2e": {
109109
"source": {
110-
"path": "asset.190116602f67fcba43a33629264da3211c4f9cc2ae688bdf0ee6d8c7e4ec48fd.lambda",
110+
"path": "asset.ef31fc89d7ced5ea0cff316469a82711784a006d3ae7a037f2b2422969eafc2e.lambda",
111111
"packaging": "zip"
112112
},
113113
"destinations": {
114114
"current_account-current_region": {
115115
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
116-
"objectKey": "190116602f67fcba43a33629264da3211c4f9cc2ae688bdf0ee6d8c7e4ec48fd.zip",
116+
"objectKey": "ef31fc89d7ced5ea0cff316469a82711784a006d3ae7a037f2b2422969eafc2e.zip",
117117
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
118118
}
119119
}
@@ -235,15 +235,15 @@
235235
}
236236
}
237237
},
238-
"452465eccdd313e71bc8716f12e024973e380b061470c9b4392f42d9419f649f": {
238+
"332ea9ae34086dc09135fb22955c4ab0465933a66dd91205e817ec23a5a6c884": {
239239
"source": {
240240
"path": "Turbo-Layer-Test.template.json",
241241
"packaging": "file"
242242
},
243243
"destinations": {
244244
"current_account-current_region": {
245245
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
246-
"objectKey": "452465eccdd313e71bc8716f12e024973e380b061470c9b4392f42d9419f649f.json",
246+
"objectKey": "332ea9ae34086dc09135fb22955c4ab0465933a66dd91205e817ec23a5a6c884.json",
247247
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
248248
}
249249
}

test/default.integ.snapshot/Turbo-Layer-Test.template.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2629,7 +2629,7 @@
26292629
"S3Bucket": {
26302630
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
26312631
},
2632-
"S3Key": "190116602f67fcba43a33629264da3211c4f9cc2ae688bdf0ee6d8c7e4ec48fd.zip"
2632+
"S3Key": "ef31fc89d7ced5ea0cff316469a82711784a006d3ae7a037f2b2422969eafc2e.zip"
26332633
},
26342634
"Role": {
26352635
"Fn::GetAtt": [
@@ -4741,7 +4741,7 @@
47414741
"S3Bucket": {
47424742
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
47434743
},
4744-
"S3Key": "190116602f67fcba43a33629264da3211c4f9cc2ae688bdf0ee6d8c7e4ec48fd.zip"
4744+
"S3Key": "ef31fc89d7ced5ea0cff316469a82711784a006d3ae7a037f2b2422969eafc2e.zip"
47454745
},
47464746
"Role": {
47474747
"Fn::GetAtt": [

0 commit comments

Comments
 (0)