google / gcp_scanner

A comprehensive scanner for Google Cloud
Apache License 2.0
305 stars 95 forks source link

fix: Unsupported NoneType on Python older than 3.10 #239

Closed mshudrak closed 1 year ago

mshudrak commented 1 year ago

In Python3 older than 3.10 we have the following error:

TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'.

This commit fixes this issue.

Fix #238

Description

[Provide a brief description of the changes you have made and why they are necessary.]

Changes Made

[List the changes you have made in bullet points.]

Checklist

Related Issues

[If your changes relate to any existing issues, please list them here.]

Additional Notes

[Provide any additional notes or context that may be helpful for the reviewers.]

Feel free to modify and customize this template as needed to fit the specific needs of the GCP Scanner project.

mshudrak commented 1 year ago

@ZetaTwo PTAL.

peb-peb commented 1 year ago

The fix works for me. Otherwise, I am unable to test my local changes.

Tested on: Windows 10 and Ubuntu 20.04 LTS (both machine have python 3.10)