1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 19:12:26 -05:00

Only log deletion when we're really deleting

This commit is contained in:
Nils Vogels 2014-05-02 23:58:27 +02:00
parent 4b5fa9582a
commit a843303812

View File

@ -216,8 +216,8 @@ class PostProcessor(object):
# delete the file and any other files which we want to delete # delete the file and any other files which we want to delete
for cur_file in file_list: for cur_file in file_list:
self._log(u"Deleting file " + cur_file, logger.DEBUG)
if ek.ek(os.path.isfile, cur_file): if ek.ek(os.path.isfile, cur_file):
self._log(u"Deleting file " + cur_file, logger.DEBUG)
#check first the read-only attribute #check first the read-only attribute
file_attribute = ek.ek(os.stat, cur_file)[0] file_attribute = ek.ek(os.stat, cur_file)[0]
if (not file_attribute & stat.S_IWRITE): if (not file_attribute & stat.S_IWRITE):