Merge pull request #631 from xbhel/main

Fix ChromiumOptions.arguments type error: list object has no attribute 'get'
This commit is contained in:
Pin Studios 2025-04-15 10:28:41 +08:00 committed by GitHub
commit ab9202fe48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -139,7 +139,7 @@ class NewTempEmail:
if sys.platform == "linux":
# Check if DISPLAY is set when not in headless mode
if not co.arguments.get("--headless=new") and not os.environ.get('DISPLAY'):
if "--headless=new" not in co.arguments and not os.environ.get('DISPLAY'):
print(f"{Fore.RED}{self.translator.get('email.no_display_found') if self.translator else 'No display found. Make sure X server is running.'}{Style.RESET_ALL}")
print(f"{Fore.YELLOW} {self.translator.get('email.try_export_display') if self.translator else 'Try: export DISPLAY=:0'}{Style.RESET_ALL}")
return False