eric6/WebBrowser/Tools/WebIconProvider.py

changeset 7836
2f0d208b8137
parent 7785
9978016560ec
child 7923
91e843545d9a
equal deleted inserted replaced
7835:0835ed67714b 7836:2f0d208b8137
88 filename = os.path.join(self.__iconDatabasePath, 88 filename = os.path.join(self.__iconDatabasePath,
89 self.__iconsFileName) 89 self.__iconsFileName)
90 try: 90 try:
91 with open(filename, "r") as f: 91 with open(filename, "r") as f:
92 db = json.load(f) 92 db = json.load(f)
93 except (IOError, OSError): 93 except OSError:
94 # ignore silentyl 94 # ignore silentyl
95 db = {} 95 db = {}
96 96
97 self.__iconsDB = {} 97 self.__iconsDB = {}
98 for url, data in db.items(): 98 for url, data in db.items():
121 filename = os.path.join(self.__iconDatabasePath, 121 filename = os.path.join(self.__iconDatabasePath,
122 self.__iconsFileName) 122 self.__iconsFileName)
123 try: 123 try:
124 with open(filename, "w") as f: 124 with open(filename, "w") as f:
125 json.dump(db, f) 125 json.dump(db, f)
126 except (IOError, OSError): 126 except OSError:
127 # ignore silentyl 127 # ignore silentyl
128 pass 128 pass
129 129
130 def saveIcon(self, view): 130 def saveIcon(self, view):
131 """ 131 """

eric ide

mercurial