fix: plugin error

This commit is contained in:
0xMRTT 2022-09-27 18:36:40 +02:00
parent 45ce557452
commit bcac517c58
No known key found for this signature in database
GPG key ID: AC9E06BF3DECB6FB

View file

@ -56,8 +56,12 @@ class FirefoxGnomeTheme2Plugin(IPlugin):
return False
def apply(self, dark_theme=False):
with (
next(Path("~/.mozilla/firefox").expanduser().glob("*.*"))
/ "chrome/firefox-gnome-theme/customChrome.css"
).open("w") as f:
f.write(self.template.format(**self.variables))
try:
with (
next(Path("~/.mozilla/firefox").expanduser().glob("*.*"))
/ "chrome/firefox-gnome-theme/customChrome.css"
).open("w") as f:
f.write(self.template.format(**self.variables))
except OSError:
pass