Skip to content

ERROR:autopromote:exceptions must derive from BaseException #60

@MScottBlake

Description

@MScottBlake

While testing the new allowlist and denylist functionality in autopromote, I encountered an error.

I had this in my json:

"denylist": {
    "Zoom": "5.7.4.898"
},
"allowlist": {
    "Zoom": "5\\..*"
},

In this test, the goal is to only promote Zoom 5.x except for 5.7.4.898.

The script output looks like this:

[ snip ]
INFO:autopromote:Considering package Zoom 5.7.1.499
INFO:autopromote:Considering package Zoom 5.7.6.1320
INFO:autopromote:Considering package Zoom 5.7.4.898
ERROR:autopromote:exceptions must derive from BaseException
Traceback (most recent call last):
  File "autopromote.py", line 473, in <module>
    main()
  File "autopromote.py", line 465, in main
    raise e
  File "autopromote.py", line 455, in main
    promotions = promote_pkgs(PKGINFOS_PATHS)
  File "autopromote.py", line 389, in promote_pkgs
    promoted, result = promote_pkg(plist, path)
  File "autopromote.py", line 299, in promote_pkg
    if not permitted(name, version):
  File "autopromote.py", line 266, in permitted
    raise f"{name} is in both allow and deny lists!"
TypeError: exceptions must derive from BaseException

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions