Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
John Lyu committed Aug 15, 2023
1 parent be74280 commit e0e88e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dataframe_image/_browser_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def launch_chrome():
"--remote-debugging-port=9222",
f"--crash-dumps-dir={temp_dir.name}",
]
if os.environ["NO_SANDBOX"] or platform.system().lower() != "windows" and os.geteuid() == 0:
if os.environ.get("NO_SANDBOX", False) or platform.system().lower() != "windows" and os.geteuid() == 0:
args.append("--no-sandbox")
p = Popen(args=args)
return p
Expand Down
2 changes: 1 addition & 1 deletion dataframe_image/_screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def take_screenshot(self, ss_width=1400, ss_height=900):
f"--force-device-scale-factor={self.device_scale_factor}",
]
# root user needs no-sandbox
if os.environ["NO_SANDBOX"] or platform.system().lower() != "windows" and os.geteuid() == 0:
if os.environ.get("NO_SANDBOX", False) or platform.system().lower() != "windows" and os.geteuid() == 0:
args.append("--no-sandbox")

if ss_width and ss_height:
Expand Down

0 comments on commit e0e88e5

Please sign in to comment.