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

Unified Diff: chrome_frame/PRESUBMIT.py

Issue 6299001: Syntax checker for policy_templates.json (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/app/policy
Patch Set: fix nit; update chrome_frame/PRESUBMIT.py Created 9 years, 11 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 | « chrome/app/policy/syntax_check_policy_template_json.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/PRESUBMIT.py
diff --git a/chrome_frame/PRESUBMIT.py b/chrome_frame/PRESUBMIT.py
index 11a7c806a772c6fbbab975d7771ed51893ed10c5..c3836b814b9a9a0cc3ce78d4d467e3aac6d6f69f 100644
--- a/chrome_frame/PRESUBMIT.py
+++ b/chrome_frame/PRESUBMIT.py
@@ -1,8 +1,7 @@
-# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import os
import sys
@@ -10,12 +9,17 @@ def CheckChange(input_api, output_api, committing):
# We need to change the path so that we can import ceee_presubmit
# which lies at the root of the ceee folder. And we do it here so that
# it doesn't pollute all the cases where we get imported yet not called.
- sys.path.append(os.path.join(input_api.PresubmitLocalPath(), '../ceee'))
- import ceee_presubmit
- return ceee_presubmit.CheckChange(input_api,
- output_api,
- committing,
- is_chrome_frame=True)
+ old_sys_path = sys.path
+ ceee_path = input_api.os_path.join(input_api.PresubmitLocalPath(), '../ceee')
+ try:
+ sys.path = [ceee_path] + sys.path
+ import ceee_presubmit
+ return ceee_presubmit.CheckChange(input_api,
+ output_api,
+ committing,
+ is_chrome_frame=True)
+ finally:
+ sys.path = old_sys_path
def CheckChangeOnUpload(input_api, output_api):
« no previous file with comments | « chrome/app/policy/syntax_check_policy_template_json.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698