Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_deadlock():
# skip these tests for Windows/Mac
if not sys.platform.startswith("linux"):
return
d = Display(visible=VISIBLE, size=(600, 400))
d.start()
p = EasyProcess([python, "-c", 'import Image;Image.new("RGB",(99, 99)).show()'])
p.start()
p.sleep(1)
# hangs with pipes
p.stop()
d.stop()
def __init__(self):
utilities.log("Initiating ProtonMail client")
try:
if not settings.show_browser:
self.virtual_display = Display(visible=0, size=(1366, 768))
self.virtual_display.start()
self.web_driver = webdriver.Firefox()
atexit.register(self.destroy)
except Exception as e:
utilities.log(
"Unable to initiate Protonmail Client. Reason: " + str(e))