diracx-cli 0.0.1a43__py3-none-any.whl → 0.0.1a44__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
diracx/cli/auth.py CHANGED
@@ -124,7 +124,9 @@ async def logout():
124
124
 
125
125
  # Revoke refresh token
126
126
  try:
127
- await api.auth.revoke_refresh_token(credentials.refresh_token)
127
+ await api.auth.revoke_refresh_token_by_refresh_token(
128
+ client_id=api.client_id, refresh_token=credentials.refresh_token
129
+ )
128
130
  except Exception as e:
129
131
  print(f"Error revoking the refresh token {e!r}")
130
132
  pass
@@ -132,6 +134,9 @@ async def logout():
132
134
  # Remove credentials
133
135
  credentials_path.unlink(missing_ok=True)
134
136
  print(f"Removed credentials from {credentials_path}")
137
+ else:
138
+ print("You are not connected to DiracX, or your credentials are missing.")
139
+ return
135
140
  print("\nLogout successful!")
136
141
 
137
142
 
diracx/cli/utils.py CHANGED
@@ -7,6 +7,7 @@ from functools import wraps
7
7
 
8
8
  import typer
9
9
  from azure.core.exceptions import ClientAuthenticationError
10
+ from httpx import ConnectError
10
11
  from rich import print
11
12
 
12
13
 
@@ -22,6 +23,10 @@ class AsyncTyper(typer.Typer):
22
23
  ":x: [bold red]You are not authenticated. Log in with:[/bold red] "
23
24
  "[bold] dirac login [OPTIONS] [VO] [/bold]"
24
25
  )
26
+ except ConnectError:
27
+ print(
28
+ ":x: [bold red]Please configure a valid DiracX server.[/bold red]"
29
+ )
25
30
 
26
31
  self.command(*args, **kwargs)(sync_func)
27
32
  return async_func
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diracx-cli
3
- Version: 0.0.1a43
3
+ Version: 0.0.1a44
4
4
  Summary: TODO
5
5
  License: GPL-3.0-only
6
6
  Classifier: Intended Audience :: Science/Research
@@ -1,15 +1,15 @@
1
1
  diracx/cli/__init__.py,sha256=HB9Umd1DXskg8lrRY0ZnSaOBVYPD5Pl4PYRWts-ZR0E,808
2
2
  diracx/cli/__main__.py,sha256=yGjYWjRcrrp5mJ0xD0v3rc7VIA9bzDib5D7LPAdH4OI,92
3
- diracx/cli/auth.py,sha256=FXpZQATi0P_xZCLCqQJ_h-hszqShd-4SD1zQ03-PXPU,4789
3
+ diracx/cli/auth.py,sha256=UZ_vhDv2K9qMH_pSFn-6hA6hL7QmBY1a_DzvLoTp-EQ,5003
4
4
  diracx/cli/config.py,sha256=LDoFT4x0VF0QAU2_y-fkZWQwD7yMYmyiM7VJFLK79GQ,863
5
5
  diracx/cli/jobs.py,sha256=ev3Zm6WH9g5MVT5EXbfSwHamiQUcatT4bYUrxx4c8BE,4729
6
6
  diracx/cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- diracx/cli/utils.py,sha256=NwhMMHwveKOdW2aoSqpnLnfOKhPnjmPPLpX69naPAzc,855
7
+ diracx/cli/utils.py,sha256=--kP1lOO4yky81nxmej8IQz1v6njxn_WYol5O9LcJ04,1063
8
8
  diracx/cli/internal/__init__.py,sha256=KZrzVcKu3YhNev2XF2KA2nttAa9ONU3CVUgatVMonJ4,143
9
9
  diracx/cli/internal/config.py,sha256=xPT7lnJ3QPqJgaNJuMoUpV6CIIxZY_d7HKFb4uINb_8,6552
10
10
  diracx/cli/internal/legacy.py,sha256=Wzfdgjbt9xxUK6MkCrEGNXdMOJzkvUGJh2MnD2j_2QE,13547
11
- diracx_cli-0.0.1a43.dist-info/METADATA,sha256=VaeBqDoMIktkW2WcbVTNRKjYL7D05UbKoMQpiArqYts,803
12
- diracx_cli-0.0.1a43.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
13
- diracx_cli-0.0.1a43.dist-info/entry_points.txt,sha256=b1909GHVOkFUiHVglNlpwia4Ug-7Ncrg-8D5xtYVAlw,169
14
- diracx_cli-0.0.1a43.dist-info/top_level.txt,sha256=vJx10tdRlBX3rF2Psgk5jlwVGZNcL3m_7iQWwgPXt-U,7
15
- diracx_cli-0.0.1a43.dist-info/RECORD,,
11
+ diracx_cli-0.0.1a44.dist-info/METADATA,sha256=1-AlfHq1Tda7gHsV_KWeTejzYjkEH5akA8myzGP9hiE,803
12
+ diracx_cli-0.0.1a44.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
13
+ diracx_cli-0.0.1a44.dist-info/entry_points.txt,sha256=b1909GHVOkFUiHVglNlpwia4Ug-7Ncrg-8D5xtYVAlw,169
14
+ diracx_cli-0.0.1a44.dist-info/top_level.txt,sha256=vJx10tdRlBX3rF2Psgk5jlwVGZNcL3m_7iQWwgPXt-U,7
15
+ diracx_cli-0.0.1a44.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5