annotate roundup/anypy/scandir_.py @ 8467:8a9fc2d74740

fix: replace localhost with ip address in case localhost is ipv6 addr?? Norbert had an issue with his docker container where the healthcheck was timing out/failing. He diagnosed it as a ipv6 address bound to localhost. Not sure if this is the right fix. Might be better to determine where localhost is bound (V4 or V6 address) but I don't have an environment I can test with.
author John Rouillard <rouilj@ieee.org>
date Fri, 31 Oct 2025 20:55:01 -0400
parents 5c5723cd721a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8091
586f76eb33e8 fix: keep python2 working a little longer.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
1 try:
586f76eb33e8 fix: keep python2 working a little longer.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
2 # python 3.5+
586f76eb33e8 fix: keep python2 working a little longer.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
3 from os import scandir
586f76eb33e8 fix: keep python2 working a little longer.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
4 except ImportError:
586f76eb33e8 fix: keep python2 working a little longer.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
5 # python 2 fallback
586f76eb33e8 fix: keep python2 working a little longer.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
6 import os
8258
5c5723cd721a chore(ruff): order imports.
John Rouillard <rouilj@ieee.org>
parents: 8091
diff changeset
7
5c5723cd721a chore(ruff): order imports.
John Rouillard <rouilj@ieee.org>
parents: 8091
diff changeset
8 import scandir # pip package
8091
586f76eb33e8 fix: keep python2 working a little longer.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
9 os.scandir = scandir.scandir

Roundup Issue Tracker: http://roundup-tracker.org/