[openstack-dev] [trove]The patch from 191859 breaks the compatibility with python 2.6

Doug Shelley doug at tesora.com
Mon Jul 6 11:29:09 UTC 2015


Hi,

Python 2.6 support was dropped in Kilo (for all of OpenStack). The patchset you mention was just merged last week and will be in Liberty. Trove is no longer being tested with Python 2.6 so it is likely things like this will continue to occur going forward.

Regards,
Doug

From: 陈迪豪 <chendihao at unitedstack.com<mailto:chendihao at unitedstack.com>>
Reply-To: OpenStack List <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Date: Monday, July 6, 2015 at 6:16 AM
To: OpenStack List <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Subject: [openstack-dev] [trove]The patch from 191859 breaks the compatibility with python 2.6

Hi all,

We're deploying trove with python 2.6 in production. And the latest code from https://review.openstack.org/#/c/191859 has broken the compatible with python 2.6.

The actual code which causes it is in trove/guestagent/common/operating_system.py and looks like thest. Python 2.6 has syntax error for this "list" expression.

def list_files_in_directory(root_dir, recursive=False, pattern=None):
    return {os.path.abspath(os.path.join(root, name))
            for (root, _, files) in os.walk(root_dir, topdown=True)
            if recursive or (root == root_dir)
            for name in files
            if not pattern or re.match(pattern, name)}

It would be great for anyone to fix it for both python 2.6 and 2.7, right?

- tobe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150706/4f8f9e26/attachment.html>


More information about the OpenStack-dev mailing list