From 5e6ef9b802c9dbcf724e443d5fdfe34670d650f3 Mon Sep 17 00:00:00 2001 From: bbhtt Date: Sat, 14 Sep 2024 07:41:00 +0530 Subject: [PATCH] Use gi.require_version before import Otherwise this raises a warning when running flat-manager-client. Fixes regression in 9689a6f80d52bd5c01508f04e7b6b808bf74376b --- flat-manager-client | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flat-manager-client b/flat-manager-client index f7b3ec6..b8e8ad8 100755 --- a/flat-manager-client +++ b/flat-manager-client @@ -33,7 +33,9 @@ from urllib.parse import urljoin, urlparse, urlunparse import aiohttp import aiohttp.client_exceptions import gi -from gi.repository import Gio, GLib, OSTree + +gi.require_version("OSTree", "1.0") +from gi.repository import Gio, GLib, OSTree # noqa: E402 from tenacity import ( retry, retry_if_exception_type, @@ -41,8 +43,6 @@ from tenacity import ( wait_random_exponential, ) -gi.require_version("OSTree", "1.0") - UPLOAD_CHUNK_LIMIT = 4 * 1024 * 1024 DEFAULT_LIMIT = 2**16