Commit 5a73364c authored by echel0n's avatar echel0n

Fixed issues with clearing out stale *.pyc files

parent 07870045
......@@ -21,7 +21,7 @@ import os
if __name__ == '__main__':
# removes stale .pyc files
for root, dirs, files in os.walk("."):
for root, dirs, files in os.walk(os.path.dirname(__file__)):
pyc_files = filter(lambda filename: filename.endswith(".pyc"), files)
py_files = set(filter(lambda filename: filename.endswith(".py"), files))
excess_pyc_files = filter(lambda pyc_filename: pyc_filename[:-1] not in py_files, pyc_files)
......
#!/usr/bin/env python2.7
# Author: echel0n <[email protected]>
# URL: https://sickrage.ca
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SickRage is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
import os
if __name__ == '__main__':
# removes stale .pyc files
for root, dirs, files in os.walk("."):
pyc_files = filter(lambda filename: filename.endswith(".pyc"), files)
py_files = set(filter(lambda filename: filename.endswith(".py"), files))
excess_pyc_files = filter(lambda pyc_filename: pyc_filename[:-1] not in py_files, pyc_files)
for excess_pyc_file in excess_pyc_files:
full_path = os.path.join(root, excess_pyc_file)
os.remove(full_path)
from sickrage import main
main()
# Changelog
- * 279eae1 - 2017-10-25: Release v9.1.53
- * c95eddc - 2017-10-26: Fixed issues with clearing out stale *.pyc files
- * 57bf43e - 2017-10-25: Release v9.1.53
- * f90baa4 - 2017-10-25: Fixed issue with wanted and missing labeling
- * c5143b6 - 2017-10-24: Release v9.1.52
- * 7772474 - 2017-10-24: Updated url to favicon for notifications
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment