diff options
| author | WerWolv <werwolv98@gmail.com> | 2022-04-12 22:27:46 +0200 |
|---|---|---|
| committer | WerWolv <werwolv98@gmail.com> | 2022-04-12 22:27:46 +0200 |
| commit | 0359fd966a5a33cd646202d0349ad5bdf01a6d1a (patch) | |
| tree | 14d5b2948f5b042f59c924f64bb65dcd223e4ac4 /plugin_loader/injector.py | |
| parent | fe9faefd0bb01212299259bcdcc431d24493d963 (diff) | |
| download | decky-loader-0359fd966a5a33cd646202d0349ad5bdf01a6d1a.tar.gz decky-loader-0359fd966a5a33cd646202d0349ad5bdf01a6d1a.zip | |
Use f-strings instead of .format
Diffstat (limited to 'plugin_loader/injector.py')
| -rw-r--r-- | plugin_loader/injector.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin_loader/injector.py b/plugin_loader/injector.py index edb09527..bf970780 100644 --- a/plugin_loader/injector.py +++ b/plugin_loader/injector.py @@ -58,7 +58,7 @@ async def get_tabs(): while True: try: - res = await web.get("{}/json".format(BASE_ADDRESS)) + res = await web.get(f"{BASE_ADDRESS}/json") break except: logger.info("Steam isn't available yet. Wait for a moment...") @@ -68,13 +68,13 @@ async def get_tabs(): res = await res.json() return [Tab(i) for i in res] else: - raise Exception("/json did not return 200. {}".format(await res.text())) + raise Exception(f"/json did not return 200. {await res.text()}") async def get_tab(tab_name): tabs = await get_tabs() tab = next((i for i in tabs if i.title == tab_name), None) if not tab: - raise ValueError("Tab {} not found".format(tab_name)) + raise ValueError(f"Tab {tab_name} not found") return tab async def inject_to_tab(tab_name, js, run_async=False): |
