Description of problem: There is a Python 3 not compatible code in libselinux-python3 Version-Release number of selected component (if applicable): libselinux-python3-2.3-5.fc21.x86_64 libselinux-python3-2.3-6.fc22 How reproducible: Always Actual results: When running that part of code, exception occurs: File "/usr/lib64/python3.4/site-packages/selinux/__init__.py", line 95, in restorecon os.path.walk(path, lambda arg, dirname, fnames: AttributeError: 'module' object has no attribute 'walk' Expected results: Should use os.walk on Python 3. Additional info: In here: https://github.com/SELinuxProject/selinux/blob/master/libselinux/src/selinuxswig_python.i#L34
Should be replaced by https://docs.python.org/2/library/os.html#os.walk
If I understand the call correctly, it could be replaced by: if recursive: for root, dirs, files in os.walk(path): for fname in files + dirs: restorecon(os.path.join(root,fname))
Here is a scratch build with proposed fix. http://koji.fedoraproject.org/koji/taskinfo?taskID=9020684
Created attachment 994296 [details] Patch to fix this, so it works on both Pythons
https://github.com/SELinuxProject/selinux/commit/42ac8d6dc4c999a0a9b5347f20159a6732cec253
libselinux-2.3-9.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/libselinux-2.3-9.fc22
libselinux-2.3-9.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/libselinux-2.3-9.fc21
Package libselinux-2.3-9.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing libselinux-2.3-9.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-6771/libselinux-2.3-9.fc21 then log in and leave karma (feedback).
libselinux-2.3-9.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
libselinux-2.3-9.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.