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

Side by Side Diff: client/cros/gbb_util.py

Issue 6623026: Refactor site_fmap, flashrom_utils and gbb_utils module into client/cros. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 9 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Provides convenience routines to access the GBB on the current BIOS. 6 """Provides convenience routines to access the GBB on the current BIOS.
7 7
8 GBBUtility is a wrapper of gbb_utility program. 8 GBBUtility is a wrapper of gbb_utility program.
9 """ 9 """
10 10
11 import os 11 import os
12 import tempfile 12 import tempfile
13 13
14 from autotest_lib.client.bin import utils
14 from autotest_lib.client.common_lib import error 15 from autotest_lib.client.common_lib import error
15 from autotest_lib.client.common_lib import flashrom_util 16 import common
16 from autotest_lib.client.common_lib import utils 17 import flashrom_util
17 18
18 19
19 class GBBUtility(object): 20 class GBBUtility(object):
20 """GBBUtility is a wrapper of gbb_utility program. 21 """GBBUtility is a wrapper of gbb_utility program.
21 22
22 It accesses the GBB on the current BIOS image. 23 It accesses the GBB on the current BIOS image.
23 """ 24 """
24 def __init__(self, 25 def __init__(self,
25 gbb_command='gbb_utility', 26 gbb_command='gbb_utility',
26 temp_dir=None, 27 temp_dir=None,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 self._remove_temp_file(rootkey_file) 185 self._remove_temp_file(rootkey_file)
185 self._need_commit = False 186 self._need_commit = False
186 self._clear_cached() 187 self._clear_cached()
187 188
188 189
189 def discard(self): 190 def discard(self):
190 """Discard all uncommitted changes.""" 191 """Discard all uncommitted changes."""
191 if self._need_commit: 192 if self._need_commit:
192 self._need_commit = False 193 self._need_commit = False
193 self._clear_cached() 194 self._clear_cached()
OLDNEW
« no previous file with comments | « client/cros/fmap.py ('k') | client/site_tests/factory_EnableWriteProtect/factory_EnableWriteProtect.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698