Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5446)

Unified Diff: chrome/test/data/native_messaging/native_hosts/echo.py

Issue 1335993002: Don't import win32gui when it's not needed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/native_messaging/native_hosts/echo.py
diff --git a/chrome/test/data/native_messaging/native_hosts/echo.py b/chrome/test/data/native_messaging/native_hosts/echo.py
index 0af7f73fd15cada85974685ef2950f25e082cbb5..33aa789f8253c72a06c59823fd9d40ccf2e3c1ae 100755
--- a/chrome/test/data/native_messaging/native_hosts/echo.py
+++ b/chrome/test/data/native_messaging/native_hosts/echo.py
@@ -38,9 +38,9 @@ def Main():
elif caller_url == None:
caller_url = arg
- if platform.system() == 'Windows':
+ if platform.system() == 'Windows' and parent_window:
import win32gui
- if parent_window and not win32gui.IsWindow(parent_window):
+ if not win32gui.IsWindow(parent_window):
sys.stderr.write('Invalid --parent-window.\n')
return 1
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698