Skip to content

Commit

Permalink
Fix Travis: ModuleNotFoundError: No module named 'six' (releasebranch…
Browse files Browse the repository at this point in the history
…_8_2) (#2845)

Currently Travis CI fails in `releasebranch_8_2`:

```
Traceback (most recent call last):

  File "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/utils/mkhtml.py", line 37, in <module>
    from six.moves.urllib import request as urlrequest

ModuleNotFoundError: No module named 'six'
```

(Example for a failed Travis run: https://github.com/OSGeo/grass/pull/2843/checks?check_run_id=11475577650)

This PR addresses the removal of `six` in a simple way.

Side note: Travis does not fail in `main` due to PR #2547,
17fc1d8#diff-3e1684c5c5d40b273b6488a9b5a5558f556d2bcf2973ba5106b6125e01aa6959
  • Loading branch information
neteler committed Feb 21, 2023
1 parent 453d019 commit 505ac5b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions utils/mkhtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@
# Python 3 import
from html.parser import HTMLParser

from six.moves.urllib import request as urlrequest
from six.moves.urllib.error import HTTPError, URLError
try:
from six.moves.urllib import request as urlrequest
from six.moves.urllib.error import HTTPError, URLError
except ImportError:
from urllib import request as urlrequest
from urllib.error import HTTPError, URLError

try:
import urlparse
Expand Down

0 comments on commit 505ac5b

Please sign in to comment.