You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/12/05 22:00:59 UTC
[airflow] branch main updated: Fix UnboundLocalError in breeze (#28126)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 82af388de2 Fix UnboundLocalError in breeze (#28126)
82af388de2 is described below
commit 82af388de2032d1c44f0c11a1759fcb96b245d0d
Author: Tomek Urbaszek <tu...@apache.org>
AuthorDate: Mon Dec 5 23:00:51 2022 +0100
Fix UnboundLocalError in breeze (#28126)
* Fix UnboundLocalError in breeze
I got the following error after installing breeze:
`UnboundLocalError: local variable 'TimeoutOccurred' referenced before assignment`
It seems that changing the import place fixes the issue.
---
dev/breeze/src/airflow_breeze/commands/main_command.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dev/breeze/src/airflow_breeze/commands/main_command.py b/dev/breeze/src/airflow_breeze/commands/main_command.py
index b217ae1b22..620068b181 100644
--- a/dev/breeze/src/airflow_breeze/commands/main_command.py
+++ b/dev/breeze/src/airflow_breeze/commands/main_command.py
@@ -155,6 +155,9 @@ def check_for_python_emulation():
def check_for_rosetta_environment():
if sys.platform != "darwin":
return
+
+ from inputimeout import TimeoutOccurred, inputimeout
+
try:
runs_in_rosetta = subprocess.check_output(
["sysctl", "-n", "sysctl.proc_translated"],
@@ -181,7 +184,6 @@ def check_for_rosetta_environment():
"If you have mixed Intel/ARM binaries installed you should likely nuke and "
"reinstall your development environment (including brew and Python) from scratch!\n\n"
)
- from inputimeout import TimeoutOccurred, inputimeout
user_status = inputimeout(
prompt="Are you REALLY sure you want to continue? (answer with y otherwise we exit in 20s)\n",