~hglkrijger/cloud-init/pep8-fixes

« back to all changes in this revision

Viewing changes to cloudinit/sources/DataSourceAltCloud.py

  • Committer: Scott Moser
  • Date: 2016-06-16 03:03:11 UTC
  • Revision ID: smoser@ubuntu.com-20160616030311-8ao9ik8grur1vpkf
fix usage of OSError.message that will not work in python3

python3's OSError does not have a .message attribute.

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
                        _err.message)
206
206
            return False
207
207
        except OSError as _err:
208
 
            util.logexc(LOG, 'Failed command: %s\n%s', ' '.join(cmd),
209
 
                        _err.message)
 
208
            util.logexc(LOG, 'Failed command: %s\n%s', ' '.join(cmd), _err)
210
209
            return False
211
210
 
212
211
        floppy_dev = '/dev/fd0'