File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,10 @@ def fetch_macros(self):
7676 self .retrieve_macros_from_wiki ()
7777 print ("Downloading icons..." )
7878 for macro in self .macros .values ():
79- self .get_icon (macro )
79+ try :
80+ self .get_icon (macro )
81+ except RuntimeError as e :
82+ self .macro_errors [macro .name ] = str (e )
8083 self .macro_stats ["errors" ] = len (self .macro_errors )
8184
8285 def create_cache (self ) -> str :
@@ -163,6 +166,8 @@ def get_icon(macro: Macro):
163166 """Downloads the macro's icon from whatever source is specified and stores its binary
164167 contents in self.icon_data"""
165168 if macro .icon .startswith ("http://" ) or macro .icon .startswith ("https://" ):
169+ if "freecadweb" in macro .icon :
170+ macro .icon = macro .icon .replace ("freecadweb" , "freecad" )
166171 parsed_url = urllib .parse .urlparse (macro .icon )
167172 try :
168173 p = requests .get (macro .icon , headers = headers , timeout = 10.0 )
You can’t perform that action at this time.
0 commit comments