From: Cyril Roelandt Date: Mon, 28 Sep 2015 11:46:35 +0000 (+0200) Subject: Python 3: use "open" instead of "file" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c6db7dcfbdb942c77659ce66c9e6511fea8ced40;p=openstack-build%2Fneutron-build.git Python 3: use "open" instead of "file" The "file" function does not exist in Python 3. Change-Id: I18561fc8e472a53c2c5f599f2312347da4cec273 Partial-Bug: #1500400 --- diff --git a/neutron/tests/functional/agent/linux/test_async_process.py b/neutron/tests/functional/agent/linux/test_async_process.py index a1bb40d91..46bc93b96 100644 --- a/neutron/tests/functional/agent/linux/test_async_process.py +++ b/neutron/tests/functional/agent/linux/test_async_process.py @@ -25,7 +25,7 @@ class AsyncProcessTestFramework(base.BaseTestCase): super(AsyncProcessTestFramework, self).setUp() self.test_file_path = self.get_temp_file_path('test_async_process.tmp') self.data = [str(x) for x in range(4)] - with file(self.test_file_path, 'w') as f: + with open(self.test_file_path, 'w') as f: f.writelines('%s\n' % item for item in self.data) def _check_stdout(self, proc):