@@ -38,15 +38,15 @@ async def translate_readme_request_async(
3838
3939 parsed = None
4040
41- for attempt in range (3 ):
41+ for attempt in range (5 ):
4242 async with semaphore :
4343 response = await self .model_handler .async_request (prompt )
4444
45- parsed = JsonProcessor .parse (response , expected_type = dict )
45+ parsed = JsonProcessor .parse (response )
4646
4747 if isinstance (parsed , dict ):
4848 break
49- logger .warning (f"Parse failed for lang={ target_language } , attempt { attempt + 1 } /3 — retrying LLM request" )
49+ logger .warning (f"Parse failed for lang={ target_language } , attempt { attempt + 1 } /5 — retrying LLM request" )
5050
5151 if not isinstance (parsed , dict ):
5252 parsed = {"content" : str (parsed ).strip (), "suffix" : target_language [:2 ].lower ()}
@@ -131,12 +131,10 @@ def set_default_translated_readme(self, translation: dict) -> None:
131131 if os .path .exists (target_path ):
132132 os .remove (target_path )
133133
134- os .symlink (source_path , target_path )
135- logger .info (f"Created symlink: { target_path } -> { source_path } " )
136- except (OSError , NotImplementedError ) as e :
137- logger .warning (f"Symlink not supported ({ e } ), copying file instead" )
138134 shutil .copyfile (source_path , target_path )
139135 logger .info (f"Copied file: { target_path } " )
136+ except (OSError , NotImplementedError ) as e :
137+ logger .error (f"Error while copying file: { e } " )
140138
141139 def get_main_readme_file (self ) -> str :
142140 """Return the content of the main README.md in the repository root, or empty string if not found."""
0 commit comments