tox -epep8 fails when Python3 is the default interpreter

Bug #1643578 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Undecided
Lucas Alvares Gomes

Bug Description

The file ./heat_docker_agent/hook-docker-cmd.py is testing if a type is "unicode", we should use six.text_type for this because it's compatible with Python2 and 3.

pep8 create: /home/lucas/Projects/tripleo-common/.tox/pep8
pep8 installdeps: -r/home/lucas/Projects/tripleo-common/requirements.txt, -r/home/lucas/Projects/tripleo-common/test-requirements.txt
pep8 develop-inst: /home/lucas/Projects/tripleo-common
pep8 installed: alabaster==0.7.9,alembic==0.8.8,amqp==1.4.9,anyjson==0.3.3,appdirs==1.4.0,Babel==2.3.4,beautifulsoup4==4.5.1,cachetools==2.0.0,cffi==1.9.1,cliff==2.3.0,cmd2==0.6.9,contextlib2==0.5.4,coverage==4.
2,croniter==0.3.13,cryptography==1.5.3,debtcollector==1.9.0,decorator==4.0.10,docker-py==1.7.2,docutils==0.12,dogpile.cache==0.6.2,eventlet==0.19.0,extras==1.0.0,fasteners==0.14.1,fixtures==3.0.0,flake8==2.2.4,f
uturist==0.19.0,greenlet==0.4.10,hacking==0.10.2,idna==2.1,iso8601==0.1.11,Jinja2==2.8,jsonpatch==1.14,jsonpointer==1.10,jsonschema==2.5.1,kazoo==2.2.1,keystoneauth1==2.15.0,keystonemiddleware==4.10.0,kombu==3.0
.37,linecache2==1.0.0,logutils==0.3.3,Mako==1.0.6,MarkupSafe==0.23,mccabe==0.2.1,mistral==3.0.2,mock==2.0.0,monotonic==1.2,mox3==0.18.0,msgpack-python==0.4.8,netaddr==0.7.18,netifaces==0.10.5,networkx==1.11,open
stacksdk==0.9.10,os-client-config==1.24.0,osc-lib==1.2.0,oslo.concurrency==3.15.0,oslo.config==3.19.0,oslo.context==2.10.0,oslo.db==4.14.0,oslo.i18n==3.10.0,oslo.log==3.17.0,oslo.messaging==5.12.0,oslo.middlewar
e==3.20.0,oslo.policy==1.16.0,oslo.serialization==2.14.0,oslo.service==1.17.0,oslo.utils==3.18.0,oslosphinx==4.8.0,oslotest==2.11.0,osprofiler==1.4.0,paramiko==2.0.2,passlib==1.6.5,Paste==2.0.3,PasteDeploy==1.5.
2,pbr==1.10.0,pecan==1.2.1,pep8==1.5.7,pika==0.10.0,pika-pool==0.1.3,ply==3.9,positional==1.1.1,prettytable==0.7.2,pyasn1==0.1.9,pycadf==2.4.0,pycparser==2.17,pyflakes==0.8.1,Pygments==2.1.3,pyinotify==0.9.6,pyO
penSSL==16.2.0,pyparsing==2.1.10,python-barbicanclient==4.1.0,python-ceilometerclient==2.7.0,python-cinderclient==1.9.0,python-dateutil==2.6.0,python-designateclient==2.3.0,python-editor==1.0.1,python-glanceclie
nt==2.5.0,python-heatclient==1.6.0,python-ironic-inspector-client==1.9.0,python-ironicclient==1.8.0,python-keystoneclient==3.6.0,python-magnumclient==2.3.1,python-mimeparse==1.6.0,python-mistralclient==2.1.1,pyt
hon-muranoclient==0.11.1,python-neutronclient==6.0.0,python-novaclient==6.0.0,python-openstackclient==3.4.1,python-subunit==1.2.0,python-swiftclient==3.2.0,python-tackerclient==0.7.0,python-troveclient==2.6.0,py
thon-zaqarclient==1.2.0,pytz==2016.7,PyYAML==3.12,repoze.lru==0.6,requests==2.12.1,requestsexceptions==1.1.3,retrying==1.3.3,rfc3986==0.4.1,Routes==2.3.1,simplegeneric==0.8.1,simplejson==3.10.0,six==1.10.0,snowb
allstemmer==1.2.1,Sphinx==1.3.6,sphinx-rtd-theme==0.1.9,SQLAlchemy==1.0.16,sqlalchemy-migrate==0.10.0,sqlparse==0.2.2,stevedore==1.18.0,Tempita==0.5.2,testrepository==0.0.20,testscenarios==0.5.0,testtools==2.2.0
,tooz==1.44.0,traceback2==1.4.0,-e git+http://github.com/openstack/tripleo-common@3d2faffe4737a0b216c1523734a93493afbc036a#egg=tripleo_common,unittest2==1.1.0,voluptuous==0.9.3,waitress==1.0.1,warlock==1.2.0,Web
Ob==1.6.3,websocket-client==0.37.0,WebTest==2.0.23,wrapt==1.10.8,WSME==0.8.0,yaql==1.1.1,zake==0.2.2
pep8 runtests: PYTHONHASHSEED='3489541928'
pep8 runtests: commands[0] | flake8
./heat_docker_agent/hook-docker-cmd.py:102:39: F821 undefined name 'unicode'
                    if type(value) is unicode and not value.strip():
                                      ^
ERROR: InvocationError: '/home/lucas/Projects/tripleo-common/.tox/pep8/bin/flake8'
_____________________________________________________________________________________________________ summary _____________________________________________________________________________________________________
ERROR: pep8: commands failed

Changed in tripleo-common:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
affects: tripleo-common → tripleo
Dougal Matthews (d0ugal)
Changed in tripleo:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 5.6.0

This issue was fixed in the openstack/tripleo-common 5.6.0 release.

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.