diff options
Diffstat (limited to 'morphlib/extractedtarball.py')
-rw-r--r-- | morphlib/extractedtarball.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/morphlib/extractedtarball.py b/morphlib/extractedtarball.py index fd98cd92..95c0582d 100644 --- a/morphlib/extractedtarball.py +++ b/morphlib/extractedtarball.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-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 @@ -42,7 +41,7 @@ class ExtractedTarball(object): # pragma: no cover self.tempdir = tempfile.mkdtemp(dir=self.app.settings['tempdir']) try: morphlib.bins.unpack_binary(self.tarball, self.tempdir) - except BaseException, e: + except BaseException as e: logging.error('Caught exception: %s' % str(e)) logging.debug('Removing temporary directory %s' % self.tempdir) shutil.rmtree(self.tempdir) @@ -54,7 +53,7 @@ class ExtractedTarball(object): # pragma: no cover tarball=os.path.basename(self.tarball), chatty=True) try: shutil.rmtree(self.tempdir) - except BaseException, e: + except BaseException as e: logging.warning( 'Error when removing temporary directory %s: %s' % (self.tempdir, str(e))) |