GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor: remove `TypeError` handling since `Python >=3.9` is required · commitizen-tools/commitizen@8055c95

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • commitizen
    • cli.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎commitizen/cli.py‎

Copy file name to clipboardExpand all lines: commitizen/cli.py
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,8 @@ def main():
632632
# This is for the command required constraint in 2.0
633633
try:
634634
args, unknown_args = parser.parse_known_args()
635-
except (TypeError, SystemExit) as e:
636-
# https://github.com/commitizen-tools/commitizen/issues/429
637-
# argparse raises TypeError when non exist command is provided on Python < 3.9
638-
# but raise SystemExit with exit code == 2 on Python 3.9
639-
if isinstance(e, TypeError) or e.code == 2:
635+
except SystemExit as e:
636+
if e.code == 2:
640637
raise NoCommandFoundError()
641638
raise e
642639

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.