diff options
Diffstat (limited to 'morphlib/plugins/cross-bootstrap_plugin.py')
-rw-r--r-- | morphlib/plugins/cross-bootstrap_plugin.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/morphlib/plugins/cross-bootstrap_plugin.py b/morphlib/plugins/cross-bootstrap_plugin.py index 2b5c8911..79609cb5 100644 --- a/morphlib/plugins/cross-bootstrap_plugin.py +++ b/morphlib/plugins/cross-bootstrap_plugin.py @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2014 Codethink Limited +# Copyright (C) 2013-2015 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -10,8 +10,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# with this program. If not, see <http://www.gnu.org/licenses/>. import cliapp import logging @@ -66,7 +65,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase): self.unpack_sources(fs_root) self.write_build_script(fs_root) self.create_tarball(handle, fs_root, system_name) - except BaseException, e: + except BaseException as e: logging.error(traceback.format_exc()) self.app.status(msg='Error while building bootstrap image', error=True) @@ -85,7 +84,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase): with cache.get(chunk_artifact) as chunk_file: try: morphlib.bins.unpack_binary_from_file(chunk_file, dest) - except BaseException, e: + except BaseException as e: self.app.status( msg='Error unpacking binary chunk %(name)s', name=chunk_artifact.name, @@ -111,7 +110,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase): chunk_script = os.path.join(path, 'src', 'build-%s' % name) with morphlib.savefile.SaveFile(chunk_script, 'w') as f: self.write_chunk_build_script(s, f) - os.chmod(chunk_script, 0777) + os.chmod(chunk_script, 0o777) def write_build_script(self, path): '''Output a script to run build on the bootstrap target''' @@ -136,7 +135,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase): f.write('if [ -e /sbin/ldconfig ]; then /sbin/ldconfig; fi\n') f.write(driver_footer) - os.chmod(driver_script, 0777) + os.chmod(driver_script, 0o777) def write_chunk_build_script(self, source, f): m = source.morphology |