Skip to content

Commit

Permalink
release 0.2.41
Browse files Browse the repository at this point in the history
  • Loading branch information
iakov-aws committed Jan 11, 2024
1 parent 5b8ec25 commit 1601fb3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cfn-templates/cid-cfn.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: Deployment of Cloud Intelligence Dashboards v0.2.40
Description: Deployment of Cloud Intelligence Dashboards v0.2.41
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
Expand Down Expand Up @@ -1506,7 +1506,7 @@ Resources:
Description: An AWS managed layer with a cid-cmd package installed
Content:
S3Bucket: !Sub '${LambdaLayerBucketPrefix}-${AWS::Region}'
S3Key: 'cid-resource-lambda-layer/cid-0.2.40.zip' #replace version here if needed
S3Key: 'cid-resource-lambda-layer/cid-0.2.41.zip' #replace version here if needed
CompatibleRuntimes:
- python3.10

Expand Down
2 changes: 1 addition & 1 deletion cid/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

__version__ = '0.2.40'
__version__ = '0.2.41'
2 changes: 1 addition & 1 deletion cid/helpers/csv2view.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def read_csv(input_file_name):
sniffer = csv.Sniffer()
try:
# AWS Organization returns a CSV with a BOM (byte order mark) character = U+FEFF to specify encoding
first_character = open(input_file_name).read(1)
first_character = open(input_file_name, errors='ignore').read(1)

Check warning

Code scanning / CodeGuru Reviewer Scanner

Resource leak Medium

**Problem*
This line of code might contain a resource leak. Resource leaks can cause your system to slow down or crash.

**Fix*
Consider closing the resource returned by the following method call: *open*. The resource is allocated by call *builtins.open*. Currently, there are execution paths that do not contain closure statements, for example, when *hasNext (in method read\_nonblank\_lines)()* throws an exception. To prevent this resource leak, close the object returned by *open()* in a try-finally block or declare it using a with statement.

**More info**
View details about the with statement in the Python developer's guide (external link).
encoding = 'utf-8-sig' if first_character == '\ufeff' else 'utf-8'

with open(input_file_name, encoding=encoding, errors='ignore') as file_:
Expand Down

0 comments on commit 1601fb3

Please sign in to comment.