diskimage-builder fails pep8 because file cannot detect use of dib-python as python script

Bug #1585688 reported by Darragh Bailey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Released
Undecided
Darragh Bailey

Bug Description

Running 'tox -e pep8' locally for diskimage-builder fails with the following in the output:

ERROR: elements/package-installs/bin/package-installs-v2 should use 4 spaces indent
45: " 'install.d' or pre-install.d")
48: " packages to install are shown")

This occurs because when 'file' is used to get the mime-type of elements/package-installs/bin/package-installs-v2, it returns 'text/plain' instead of python as the first line of the script is '#!/usr/local/bin/dib-python', resulting in the custom bash orientated style checking instead of using flake8.

Tested on Ubuntu 16.04

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/321126

Changed in diskimage-builder:
assignee: nobody → Darragh Bailey (dbailey-k)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.openstack.org/321126
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=716be1d6f0d8fe26c0a1b294cdb8228596e4aedc
Submitter: Jenkins
Branch: master

commit 716be1d6f0d8fe26c0a1b294cdb8228596e4aedc
Author: Darragh Bailey <email address hidden>
Date: Wed May 25 16:49:59 2016 +0100

    Handle file magic type varying order matching

    Allow file test to return all possible mime-types and ensure anything
    that matches the python file type is parsed by flake8 instead of
    relying on the first match returned.

    Closes-Bug: #1585688
    Change-Id: Iba31f1853537fe9234ab6f83d66f13dc1c578abb

Changed in diskimage-builder:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.