This is an automated email from the ASF dual-hosted git repository.
rabreu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git
The following commit(s) were added to refs/heads/master by this push:
new d5579ca49 fix: replace 5 bare except clauses with except Exception
(#8392)
d5579ca49 is described below
commit d5579ca4939d3da5ff3d9c91b59a8795e26e3896
Author: Sense_wang <[email protected]>
AuthorDate: Thu Feb 26 22:04:27 2026 +0800
fix: replace 5 bare except clauses with except Exception (#8392)
---
bin/docker-to-squash.py | 2 +-
bin/storm.py | 6 +++---
dev-tools/gitact/print-errors-from-test-reports.py | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/bin/docker-to-squash.py b/bin/docker-to-squash.py
index e63c05c27..4ea3a371f 100755
--- a/bin/docker-to-squash.py
+++ b/bin/docker-to-squash.py
@@ -1735,7 +1735,7 @@ def check_dependencies():
try:
command = ["setfattr", "--version"]
shell_command(command, False, False, True)
- except:
+ except Exception:
logging.error("Could not find setfattr . Make sure it is installed and
present on the PATH")
return 1
diff --git a/bin/storm.py b/bin/storm.py
index 956abde00..81d6e4e4d 100755
--- a/bin/storm.py
+++ b/bin/storm.py
@@ -230,7 +230,7 @@ def resolve_dependencies(artifacts, artifact_repositories,
maven_local_repos_dir
try:
out_dict = json.loads(output)
return out_dict
- except:
+ except Exception:
raise RuntimeError(f"dependency handler returns non-json response:
sysout<{output}>", )
@@ -1126,7 +1126,7 @@ def set_log_level(args):
if ":" in new_value:
_, timeout = new_value.split(":")
int(timeout)
- except:
+ except Exception:
raise argparse.ArgumentTypeError("Should be in the form[logger
name]=[log level][:optional timeout]")
exec_storm_class(
"org.apache.storm.command.SetLogLevel",
@@ -1152,7 +1152,7 @@ def rebalance(args):
new_value = int(new_value)
if new_value < 0:
raise argparse.ArgumentTypeError("Executor count should be >
0")
- except:
+ except Exception:
raise argparse.ArgumentTypeError("Should be in the form
component_name=new_executor_count")
exec_storm_class(
"org.apache.storm.command.Rebalance",
diff --git a/dev-tools/gitact/print-errors-from-test-reports.py
b/dev-tools/gitact/print-errors-from-test-reports.py
index 886b9ab55..1c659ab99 100644
--- a/dev-tools/gitact/print-errors-from-test-reports.py
+++ b/dev-tools/gitact/print-errors-from-test-reports.py
@@ -38,7 +38,7 @@ def print_error_reports_from_report_file(file_path):
tree = ElementTree()
try:
tree.parse(file_path)
- except:
+ except Exception:
print("-" * 50)
print("Error parsing %s"%file_path)
f = open(file_path, "r")