Skip to content

threatq: fix py2-style artifacts resulting in SyntaxError - #45279

Merged
kamalq97 merged 2 commits into
masterfrom
contrib/Andrej730_fix-threatq-syntax-error
Jul 30, 2026
Merged

threatq: fix py2-style artifacts resulting in SyntaxError#45279
kamalq97 merged 2 commits into
masterfrom
contrib/Andrej730_fix-threatq-syntax-error

Conversation

@content-bot

Copy link
Copy Markdown
Contributor

Original External PR

external pull request

Contributor

@Andrej730

Contributing to Cortex XSOAR Content

Make sure to register your contribution by filling the contribution registration form

The Pull Request will be reviewed only after the contribution registration form is filled.

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Description

This file is the only syntax error present in the repo, see below.

except Exception, e:
results = {'ContentsFormat': formats['markdown'], 'Type': entryTypes['note'], 'Contents': "No results from ThreatQ"}
return results

except Exception, e:
raise
return_error(e)

uv run --no-project --python 3.10 -m compileall . -q
# ** Error compiling './Packs/ThreatQ/Integrations/ThreatQ/ThreatQ.py'...
#  File "./Packs/ThreatQ/Integrations/ThreatQ/ThreatQ.py", line 106
#    except Exception, e:
#           ^^^^^^^^^^^^
# SyntaxError: multiple exception types must be parenthesized

except Exception, e: looked like either artifact from Python 2 (Python was using this syntax instead of except Exception as e) or just a typo. To fix the issue I've dropped unused e in one case and replaced with as e in another.

Must have

  • Tests
  • Documentation

fixes: https://jira-dc.paloaltonetworks.com/browse/CIAC-17494

This file is the only syntax error present on the repo:

```sh
uv run --no-project --python 3.10 -m compileall . -q
# ** Error compiling './Packs/ThreatQ/Integrations/ThreatQ/ThreatQ.py'...
#  File "./Packs/ThreatQ/Integrations/ThreatQ/ThreatQ.py", line 106
#    except Exception, e:
#           ^^^^^^^^^^^^
# SyntaxError: multiple exception types must be parenthesized
```
@content-bot content-bot added bug Contribution Thank you! Contributions are always welcome! docs-approved Contribution Form Filled Whether contribution form filled or not. Community python Pull requests that update Python code Xsoar Support Level Indicates that the contribution is for XSOAR supported pack Internal PR skip-ai-review ready-for-pipeline-running Whether the pr is ready for running the whole pipeline, including testing on SAAS machines labels Jul 29, 2026
@content-bot
content-bot requested a review from kamalq97 July 29, 2026 12:20
@content-bot

Copy link
Copy Markdown
Contributor Author

🤖 AI-Powered Code Review Available

Hi @kamalq97, you can leverage AI-powered code review to assist with this PR!

Available Commands:

  • @marketplace-ai-reviewer start review - Initiate a full AI code review
  • @marketplace-ai-reviewer re-review - Incremental review for new commits

@content-bot

Copy link
Copy Markdown
Contributor Author

🤖 AI-Powered Code Review Available

You can leverage AI-powered code review to assist with this PR!

Available Commands:

  • @marketplace-ai-reviewer start review - Initiate a full AI code review
  • @marketplace-ai-reviewer re-review - Incremental review for new commits

@content-bot

Copy link
Copy Markdown
Contributor Author

Validate summary
The following errors were thrown as a part of this pr: .
If the AG100 validation in the pre-commit GitHub Action fails, the pull request cannot be force-merged.

Verdict: PR can be force merged from validate perspective? ✅

@content-bot

Copy link
Copy Markdown
Contributor Author

🔍 AI Triage Report Available

An automated triage report has been generated for this pipeline.

Status: success
Report ID: 126c46bfbffe1cd1

📋 Triage Report

⚠️ AI-generated triage. Validate before acting.

@kamalq97
kamalq97 merged commit eef91e6 into master Jul 30, 2026
26 checks passed
@kamalq97
kamalq97 deleted the contrib/Andrej730_fix-threatq-syntax-error branch July 30, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Community Contribution Form Filled Whether contribution form filled or not. Contribution Thank you! Contributions are always welcome! docs-approved Internal PR python Pull requests that update Python code ready-for-pipeline-running Whether the pr is ready for running the whole pipeline, including testing on SAAS machines skip-ai-review Xsoar Support Level Indicates that the contribution is for XSOAR supported pack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants