Skip to content

Commit

Permalink
fix: Add missing importlib.util import
Browse files Browse the repository at this point in the history
* Without first importing importlib.util an AttributeError will be raised

```
Traceback (most recent call last):
  File "/madanalysis5/./bin/ma5", line 51, in <module>
    if not importlib.util.find_spec("six"):
           ^^^^^^^^^^^^^^
AttributeError: module 'importlib' has no attribute 'util'
```
  • Loading branch information
matthewfeickert committed Dec 3, 2024
1 parent 3900ec9 commit 64c4766
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/ma5
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and call immediately the command line interface scripts
"""

import importlib
import importlib.util
import os
import sys

Expand Down
3 changes: 3 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

## Bug fixes

* Add missing `importlib.util` import.
([#278](https://github.com/MadAnalysis/madanalysis5/pull/278))

## Contributors

This release contains contributions from (in alphabetical order):

0 comments on commit 64c4766

Please sign in to comment.