mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 16:22:53 +00:00

This patch makes BuildEnvironmentNotFoundException a subclass of AttributeError as well, because hasattr in python3 no longer catches all tracebacks but only AttributeError, and we use both hasattr and BuildEnvironmentNotFoundException to guard against a handful of buildconfig variables in a few places where it is OK to not have a buildenvironment. We also use universal_newlines in real_host in init.configure (since I found that fix while working on the AttributeError one) so that we get the right string type back from the process call Lastly this patch also uses BytesIO for calling into a ReducedConfigureSandbox as its stdout and stderr pipes, This ensures that related code handling the sandbox doesn't complain about getbuffer() missing in StringIO in py3. Differential Revision: https://phabricator.services.mozilla.com/D36605 --HG-- extra : moz-landing-system : lando
This directory contains common Python code. The basic rule is that if Python code is cross-module (that's "module" in the Mozilla meaning - as in "module ownership") and is MPL-compatible, it should go here. What should not go here: * Vendored python modules (use third_party/python instead) * Python that is not MPL-compatible (see other-licenses/) * Python that has good reason to remain close to its "owning" (Mozilla) module (e.g. it is only being consumed from there). Historical information can be found at https://bugzilla.mozilla.org/show_bug.cgi?id=775243 https://bugzilla.mozilla.org/show_bug.cgi?id=1346025