Browse Source

getDefaultCursor exception fixed

sisyphus
JezerM 3 years ago
parent
commit
97295af95c
No known key found for this signature in database
GPG Key ID: 66BBC5D01388C6B5
  1. 10
      web-greeter/browser/browser.py

10
web-greeter/browser/browser.py

@ -87,9 +87,13 @@ ENABLED_SETTINGS = [
def getDefaultCursor(): def getDefaultCursor():
cursor_theme = "" cursor_theme = ""
file = open("/usr/share/icons/default/index.theme") matched = None
matched = re.search(r"Inherits=.*", file.read()) try:
file.close() file = open("/usr/share/icons/default/index.theme")
matched = re.search(r"Inherits=.*", file.read())
file.close()
except Exception:
return ""
if not matched: if not matched:
logger.error("Default cursor couldn't be get") logger.error("Default cursor couldn't be get")
return "" return ""

Loading…
Cancel
Save