~cyphermox/curtin/curthooks

« back to all changes in this revision

Viewing changes to tests/vmtests/__init__.py

  • Committer: Scott Moser
  • Date: 2016-12-02 02:01:20 UTC
  • Revision ID: smoser@ubuntu.com-20161202020120-kps17njthu4bxwxk
pep8: fix pep8 errors found with 'make pep8' on zesty.

This can also be seen by running pep8 in a tox environment, but
as it is right now, our Makefile uses ./tools/run-pep8.
That runs 'pep8', where our tox environment runs 'flake8'.

We should really resolve that difference, but for now I am just
quickly committing the fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
519
519
            raise
520
520
        finally:
521
521
            if os.path.exists(cls.install_log):
522
 
                with open(cls.install_log, 'rb') as l:
523
 
                    content = l.read().decode('utf-8', errors='replace')
 
522
                with open(cls.install_log, 'rb') as lfh:
 
523
                    content = lfh.read().decode('utf-8', errors='replace')
524
524
                logger.debug('install serial console output:\n%s', content)
525
525
            else:
526
526
                logger.warn("Boot for install did not produce a console log.")
528
528
        logger.debug('')
529
529
        try:
530
530
            if os.path.exists(cls.install_log):
531
 
                with open(cls.install_log, 'rb') as l:
532
 
                    install_log = l.read().decode('utf-8', errors='replace')
 
531
                with open(cls.install_log, 'rb') as lfh:
 
532
                    install_log = lfh.read().decode('utf-8', errors='replace')
533
533
                errmsg, errors = check_install_log(install_log)
534
534
                if errmsg:
535
535
                    for e in errors:
630
630
            raise e
631
631
        finally:
632
632
            if os.path.exists(cls.boot_log):
633
 
                with open(cls.boot_log, 'rb') as l:
634
 
                    content = l.read().decode('utf-8', errors='replace')
 
633
                with open(cls.boot_log, 'rb') as lfh:
 
634
                    content = lfh.read().decode('utf-8', errors='replace')
635
635
                logger.debug('boot serial console output:\n%s', content)
636
636
            else:
637
637
                    logger.warn("Booting after install not produce"