mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
tools: handle NULL svgs in ratbag-command
Showed up in #526 https://github.com/libratbag/libratbag/issues/526#issuecomment-420016451
This commit is contained in:
@@ -292,7 +292,11 @@ class RatbagdDevice(metaclass=MetaRatbag):
|
||||
|
||||
@param theme The theme from which to retrieve the SVG, as str
|
||||
"""
|
||||
return os.path.join(LIBRATBAG_DATA_DIR, theme, libratbag.ratbag_device_get_svg_name(self._device))
|
||||
svg = libratbag.ratbag_device_get_svg_name(self._device)
|
||||
if svg is None:
|
||||
return ''
|
||||
|
||||
return os.path.join(LIBRATBAG_DATA_DIR, theme, svg)
|
||||
|
||||
def get_svg_fd(self, theme):
|
||||
"""Returns a File-like object to the SVG for the given theme, or
|
||||
|
||||
Reference in New Issue
Block a user