Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name 'logger' is not defined when ./wpt run startup fails #28245

Closed
arenevier opened this issue Mar 25, 2021 · 0 comments · Fixed by #28246
Closed

NameError: name 'logger' is not defined when ./wpt run startup fails #28245

arenevier opened this issue Mar 25, 2021 · 0 comments · Fixed by #28246

Comments

@arenevier
Copy link
Contributor

Hi ./wpt run fails to start (for example, if another instance of the server is already running), we get the following stacktrace:

Traceback (most recent call last):
  File "/usr/lib64/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib64/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/arenevier/src/wpt/tools/serve/serve.py", line 536, in create_daemon
    logger.critical(traceback.format_exc())
NameError: name 'logger' is not defined

This is because create_daemon is called in a new python instance, and therefore, global variable logger isn't defined anymore.

jgraham pushed a commit that referenced this issue Apr 6, 2021
create_daemon is sometimes called in a new python instance, in which
case it looses the reference to global variable logger. When it happens,
we redefine logger with at default value.

Fixes #28245
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Apr 15, 2021
…testonly

Automatic update from web-platform-tests
serve.py: Define logger if undefined

create_daemon is sometimes called in a new python instance, in which
case it looses the reference to global variable logger. When it happens,
we redefine logger with at default value.

Fixes web-platform-tests/wpt#28245

--

wpt-commits: b578f56f07749b2fa1a876510f5aea3845d44356
wpt-pr: 28246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants