UnboundLocalError: cannot access local variable 'tmp' where it is not associated with a value

On newly installed Fedora 40.

$ pip install --user tft-cli
Collecting tft-cli
  Downloading tft_cli-0.0.19-py3-none-any.whl.metadata (731 bytes)
Collecting click<8.1.0,>=8.0.4 (from tft-cli)
  Downloading click-8.0.4-py3-none-any.whl.metadata (3.2 kB)
Collecting colorama<0.5.0,>=0.4.4 (from tft-cli)
  Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting dynaconf<4.0.0,>=3.1.7 (from tft-cli)
  Downloading dynaconf-3.2.6-py2.py3-none-any.whl.metadata (9.1 kB)
Requirement already satisfied: requests<3.0.0,>=2.27.1 in /usr/lib/python3.12/site-packages (from tft-cli) (2.31.0)
Collecting ruamel-yaml<0.19.0,>=0.18.6 (from tft-cli)
  Using cached ruamel.yaml-0.18.6-py3-none-any.whl.metadata (23 kB)
Requirement already satisfied: setuptools in /usr/lib/python3.12/site-packages (from tft-cli) (69.0.3)
Collecting typer<0.8.0,>=0.7.0 (from typer[all]<0.8.0,>=0.7.0->tft-cli)
  Downloading typer-0.7.0-py3-none-any.whl.metadata (17 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/lib/python3.12/site-packages (from requests<3.0.0,>=2.27.1->tft-cli) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.12/site-packages (from requests<3.0.0,>=2.27.1->tft-cli) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3.12/site-packages (from requests<3.0.0,>=2.27.1->tft-cli) (1.26.19)
Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in /usr/lib64/python3.12/site-packages (from ruamel-yaml<0.19.0,>=0.18.6->tft-cli) (0.2.7)
Collecting shellingham<2.0.0,>=1.3.0 (from typer[all]<0.8.0,>=0.7.0->tft-cli)
  Downloading shellingham-1.5.4-py2.py3-none-any.whl.metadata (3.5 kB)
Collecting rich<13.0.0,>=10.11.0 (from typer[all]<0.8.0,>=0.7.0->tft-cli)
  Downloading rich-12.6.0-py3-none-any.whl.metadata (18 kB)
Collecting commonmark<0.10.0,>=0.9.0 (from rich<13.0.0,>=10.11.0->typer[all]<0.8.0,>=0.7.0->tft-cli)
  Downloading commonmark-0.9.1-py2.py3-none-any.whl.metadata (5.7 kB)
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /usr/lib/python3.12/site-packages (from rich<13.0.0,>=10.11.0->typer[all]<0.8.0,>=0.7.0->tft-cli) (2.17.2)
Downloading tft_cli-0.0.19-py3-none-any.whl (19 kB)
Downloading click-8.0.4-py3-none-any.whl (97 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.5/97.5 kB 2.3 MB/s eta 0:00:00
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Downloading dynaconf-3.2.6-py2.py3-none-any.whl (231 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 231.1/231.1 kB 5.4 MB/s eta 0:00:00
Using cached ruamel.yaml-0.18.6-py3-none-any.whl (117 kB)
Downloading typer-0.7.0-py3-none-any.whl (38 kB)
Downloading rich-12.6.0-py3-none-any.whl (237 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 237.5/237.5 kB 12.6 MB/s eta 0:00:00
Downloading shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)
Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.1/51.1 kB 5.7 MB/s eta 0:00:00
Installing collected packages: commonmark, shellingham, ruamel-yaml, rich, dynaconf, colorama, click, typer, tft-cli
Successfully installed click-8.0.4 colorama-0.4.6 commonmark-0.9.1 dynaconf-3.2.6 rich-12.6.0 ruamel-yaml-0.18.6 shellingham-1.5.4 tft-cli-0.0.19 typer-0.7.0

[notice] A new release of pip is available: 23.3.2 -> 24.2
[notice] To update, run: pip install --upgrade pip
$ echo $TESTING_FARM_API_TOKEN
<my token>
$ testing-farm reserve --compose RHEL-7.9-ZStream --duration 720
💻 RHEL-7.9-ZStream on x86_64 
🕗 Reserved for 720 minutes
⏳ Maximum reservation time is 720 minutes
🔎 https://api.dev.testing-farm.io/v0.1/requests/b795e89c-6a34-4be9-9416-65a1ddfc0ae3
🌎 ssh root@10.31.14.168
Warning: Permanently added '10.31.14.168' (ED25519) to the list of known hosts.
Last login: Mon Aug 12 10:40:09 2024 from 10.31.11.66
Welcome to Testing Farm!

Machine is reserved for 720 minutes.

To extend the reservation, run 'extend-reservation MINUTES'.

To return machine back, run 'return2testingfarm'.

To reboot the machine, use 'tmt-reboot'.
root@c4a7bb07-fbce-4bb5-bd50-901b163b95b6 ~]# client_loop: send disconnect: Broken pipe
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/mbocek/.local/lib/python3.12/site-packages/tft/cli/commands.py:1447 in reserve             │
│                                                                                                  │
│   1444 │   │   os.system(                                                                        │
│   1445 │   │   │   f"ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null{ssh_proxy_op  │
│   1446 │   │   )                                                                                 │
│ ❱ 1447 │   │   os.unlink(tmp.name)                                                               │
│   1448                                                                                           │
│   1449                                                                                           │
│   1450 def update():                                                                             │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │                  _echo = <function reserve.<locals>._echo at 0x7f130ac46520>                 │ │
│ │                   arch = 'x86_64'                                                            │ │
│ │          artifacts_url = 'https://artifacts.osci.redhat.com/testing-farm/89efabf2-71db-4130… │ │
│ │        authorized_keys = b'ssh-rsa                                                           │ │
│ │                          AAAAB3NzaC1yc2EAAAADAQABAAACAQC6rwxJ31JGUKMvfLogC+D+qv65sz1XzeHdLR… │ │
│ │  authorized_keys_bytes = b'c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFDQVFDNnJ3eEozMUpH… │ │
│ │            autoconnect = True                                                                │ │
│ │                compose = 'RHEL-7-LatestUpdated'                                              │ │
│ │                content = {'ssh_proxy': None, 'ssh_private_key_base_64': None}                │ │
│ │          current_state = 'ready'                                                             │ │
│ │                dry_run = False                                                               │ │
│ │            environment = {                                                                   │ │
│ │                          │   'arch': 'x86_64',                                               │ │
│ │                          │   'os': {'compose': 'RHEL-7-LatestUpdated'},                      │ │
│ │                          │   'pool': None,                                                   │ │
│ │                          │   'artifacts': [],                                                │ │
│ │                          │   'variables': {'TF_RESERVATION_DURATION': '720'},                │ │
│ │                          │   'secrets': {                                                    │ │
│ │                          │   │   'TF_RESERVATION_AUTHORIZED_KEYS_BASE64':                    │ │
│ │                          'c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFDQVFDNnJ3eEozMUpHV… │ │
│ │                          │   }                                                               │ │
│ │                          }                                                                   │ │
│ │      fedora_copr_build = []                                                                  │ │
│ │      fedora_koji_build = []                                                                  │ │
│ │                get_url = 'https://api.dev.testing-farm.io/v0.1/requests/89efabf2-71db-4130-… │ │
│ │                  guest = '10.31.40.43'                                                       │ │
│ │               hardware = []                                                                  │ │
│ │                     id = '89efabf2-71db-4130-a8fb-dfd6eea803b0'                              │ │
│ │              kickstart = []                                                                  │ │
│ │           pipeline_log = "++ date\n+ printf '\\n[pipeline-start] Mon Aug 12 02:20:10 PM UTC  │ │
│ │                          2024\\n\\n'\n\n[pipe"+36071                                         │ │
│ │                   pool = None                                                                │ │
│ │              pool_info = ''                                                                  │ │
│ │    post_install_script = None                                                                │ │
│ │               post_url = 'https://api.dev.testing-farm.io/v0.1/requests'                     │ │
│ │  print_only_request_id = False                                                               │ │
│ │               progress = <rich.progress.Progress object at 0x7f130aa591c0>                   │ │
│ │      redhat_brew_build = []                                                                  │ │
│ │             repository = []                                                                  │ │
│ │        repository_file = []                                                                  │ │
│ │                request = {                                                                   │ │
│ │                          │   'id': '89efabf2-71db-4130-a8fb-dfd6eea803b0',                   │ │
│ │                          │   'user_id': 'da8a8314-a720-493b-88e1-0e4671975e22',              │ │
│ │                          │   'token_id': 'da8a8314-a720-493b-88e1-0e4671975e22',             │ │
│ │                          │   'test': {                                                       │ │
│ │                          │   │   'fmf': {                                                    │ │
│ │                          │   │   │   'url': 'https://gitlab.com/testing-farm/tests',         │ │
│ │                          │   │   │   'ref': 'main',                                          │ │
│ │                          │   │   │   'merge_sha': None,                                      │ │
│ │                          │   │   │   'path': '.',                                            │ │
│ │                          │   │   │   'name': '/testing-farm/reserve',                        │ │
│ │                          │   │   │   'settings': None,                                       │ │
│ │                          │   │   │   'plan_filter': None,                                    │ │
│ │                          │   │   │   'test_name': None,                                      │ │
│ │                          │   │   │   'test_filter': None                                     │ │
│ │                          │   │   },                                                          │ │
│ │                          │   │   'script': None,                                             │ │
│ │                          │   │   'sti': None                                                 │ │
│ │                          │   },                                                              │ │
│ │                          │   'state': 'running',                                             │ │
│ │                          │   'environments_requested': [                                     │ │
│ │                          │   │   {                                                           │ │
│ │                          │   │   │   'arch': 'x86_64',                                       │ │
│ │                          │   │   │   'os': {'compose': 'RHEL-7-LatestUpdated'},              │ │
│ │                          │   │   │   'pool': None,                                           │ │
│ │                          │   │   │   'variables': {'TF_RESERVATION_DURATION': '720'},        │ │
│ │                          │   │   │   'secrets': None,                                        │ │
│ │                          │   │   │   'artifacts': [],                                        │ │
│ │                          │   │   │   'settings': None,                                       │ │
│ │                          │   │   │   'tmt': None,                                            │ │
│ │                          │   │   │   'hardware': None,                                       │ │
│ │                          │   │   │   'kickstart': None                                       │ │
│ │                          │   │   }                                                           │ │
│ │                          │   ],                                                              │ │
│ │                          │   'notes': [                                                      │ │
│ │                          │   │   {                                                           │ │
│ │                          │   │   │   'level': 'info',                                        │ │
│ │                          │   │   │   'message': 'tf-tmt/dispatch-1723472410-e21eff78'        │ │
│ │                          │   │   }                                                           │ │
│ │                          │   ],                                                              │ │
│ │                          │   'result': None,                                                 │ │
│ │                          │   'run': {                                                        │ │
│ │                          │   │   'console': None,                                            │ │
│ │                          │   │   'stages': None,                                             │ │
│ │                          │   │   'artifacts':                                                │ │
│ │                          'https://artifacts.osci.redhat.com/testing-farm/89efabf2-71db-4130… │ │
│ │                          │   },                                                              │ │
│ │                          │   'settings': None,                                               │ │
│ │                          │   ... +5                                                          │ │
│ │                          }                                                                   │ │
│ │   reservation_duration = 720                                                                 │ │
│ │               response = <Response [200]>                                                    │ │
│ │                 search = <re.Match object; span=(12473, 12556), match='Guest is ready:       │ │
│ │                          ArtemisGuest(c4a7bb07-fbce-4bb5-b>                                  │ │
│ │                session = <requests.sessions.Session object at 0x7f130ac43e60>                │ │
│ │        ssh_private_key = ''                                                                  │ │
│ │ ssh_private_key_option = ''                                                                  │ │
│ │       ssh_proxy_option = ''                                                                  │ │
│ │        ssh_public_keys = ['~/.ssh/*.pub']                                                    │ │
│ │           sshproxy_url = 'https://api.dev.testing-farm.io/v0.1/sshproxy?api_key=67a7489f-7d… │ │
│ │                  state = 'running'                                                           │ │
│ │                task_id = 0                                                                   │ │
│ │                   test = {                                                                   │ │
│ │                          │   'url': 'https://gitlab.com/testing-farm/tests',                 │ │
│ │                          │   'ref': 'main',                                                  │ │
│ │                          │   'name': '/testing-farm/reserve'                                 │ │
│ │                          }                                                                   │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
UnboundLocalError: cannot access local variable 'tmp' where it is not associated with a value