OLD | NEW |
1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2009 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 | 5 import os |
6 import web | 6 import web |
7 from datetime import datetime | 7 from datetime import datetime |
8 import time | 8 import time |
9 | 9 |
10 class BuildObject: | 10 class BuildObject(object): |
11 """ | 11 """ |
12 Common base class that defines key paths in the source tree. | 12 Common base class that defines key paths in the source tree. |
13 """ | 13 """ |
14 def __init__(self, root_dir, static_dir): | 14 def __init__(self, root_dir, static_dir): |
15 self.app_id = "87efface-864d-49a5-9bb3-4b050a7c227a" | 15 self.app_id = "87efface-864d-49a5-9bb3-4b050a7c227a" |
16 self.root_dir = root_dir | 16 self.root_dir = root_dir |
17 self.scripts_dir = "%s/scripts" % self.root_dir | 17 self.scripts_dir = "%s/scripts" % self.root_dir |
18 self.static_dir = static_dir | 18 self.static_dir = static_dir |
19 self.x86_pkg_dir = "%s/build/x86/local_packages" % self.root_dir | 19 self.x86_pkg_dir = "%s/build/x86/local_packages" % self.root_dir |
20 | 20 |
21 def AssertSystemCallSuccess(self, err, cmd="unknown"): | 21 def AssertSystemCallSuccess(self, err, cmd="unknown"): |
22 """ | 22 """ |
23 TODO(rtc): This code should probably live somewhere else. | 23 TODO(rtc): This code should probably live somewhere else. |
24 """ | 24 """ |
25 if err != 0: | 25 if err != 0: |
26 raise Exception("%s failed to execute" % cmd) | 26 raise Exception("%s failed to execute" % cmd) |
OLD | NEW |