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

Side by Side Diff: buildutil.py

Issue 6542009: devserver: start using payload scripts bundled with devserver (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/dev-util.git@master
Patch Set: Nits Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « autoupdate.py ('k') | host/cros_generate_stateful_update_payload » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os, sys
6
5 class BuildObject(object): 7 class BuildObject(object):
6 """ 8 """
7 Common base class that defines key paths in the source tree. 9 Common base class that defines key paths in the source tree.
8 """ 10 """
9 def __init__(self, root_dir, static_dir): 11 def __init__(self, root_dir, static_dir):
10 self.app_id = "87efface-864d-49a5-9bb3-4b050a7c227a" 12 self.app_id = '87efface-864d-49a5-9bb3-4b050a7c227a'
11 self.root_dir = root_dir 13 self.root_dir = root_dir
12 self.scripts_dir = "%s/scripts" % self.root_dir 14 self.scripts_dir = '%s/src/scripts' % os.environ['CROS_WORKON_SRCROOT']
15 self.devserver_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
13 self.static_dir = static_dir 16 self.static_dir = static_dir
14 self.x86_pkg_dir = "%s/build/x86/local_packages" % self.root_dir 17 self.x86_pkg_dir = '%s/build/x86/local_packages' % self.root_dir
15 18
16 def AssertSystemCallSuccess(self, err, cmd="unknown"): 19 def AssertSystemCallSuccess(self, err, cmd='unknown'):
17 """ 20 """
18 TODO(rtc): This code should probably live somewhere else. 21 TODO(rtc): This code should probably live somewhere else.
19 """ 22 """
20 if err != 0: 23 if err != 0:
21 raise Exception("%s failed to execute" % cmd) 24 raise Exception('%s failed to execute' % cmd)
OLDNEW
« no previous file with comments | « autoupdate.py ('k') | host/cros_generate_stateful_update_payload » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698