File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 19
19
# required, or unavailable.
20
20
gi .require_version ("Gtk" , "3.0" )
21
21
# Also require GioUnix to avoid PyGIWarning when Gio is imported
22
- gi .require_version ("GioUnix" , "2.0" )
22
+ # GioUnix is platform-specific and may not be available on all systems
23
+ try :
24
+ gi .require_version ("GioUnix" , "2.0" )
25
+ except ValueError :
26
+ # GioUnix is not available on this platform, which is fine
27
+ pass
23
28
except ValueError as e :
24
29
# in this case we want to re-raise as ImportError so the
25
30
# auto-backend selection logic correctly skips.
Original file line number Diff line number Diff line change 18
18
# required, or unavailable.
19
19
gi .require_version ("Gtk" , "4.0" )
20
20
# Also require GioUnix to avoid PyGIWarning when Gio is imported
21
- gi .require_version ("GioUnix" , "2.0" )
21
+ # GioUnix is platform-specific and may not be available on all systems
22
+ try :
23
+ gi .require_version ("GioUnix" , "2.0" )
24
+ except ValueError :
25
+ # GioUnix is not available on this platform, which is fine
26
+ pass
22
27
except ValueError as e :
23
28
# in this case we want to re-raise as ImportError so the
24
29
# auto-backend selection logic correctly skips.
You can’t perform that action at this time.
0 commit comments