Пример #1
0
 def run(self, temp_files):
     for shard in temp_files:
         for filename in shard:
             # Try extra hard to delete the file.
             for _ in range(10):
                 try:
                     files.delete(filename)
                     break
                 except:
                     pass
 def run(self, temp_files):
   for shard in temp_files:
     for filename in shard:
       # Try extra hard to delete the file.
       for _ in range(10):
         try:
           files.delete(filename)
           break
         except:
           pass
Пример #3
0
 def delete_file_or_list(self, filename_or_list):
   if isinstance(filename_or_list, list):
     for filename in filename_or_list:
       self.delete_file_or_list(filename)
   else:
     filename = filename_or_list
     for _ in range(10):
       try:
         files.delete(filename)
         break
       except:
         pass
Пример #4
0
 def delete_file_or_list(self, filename_or_list):
   if isinstance(filename_or_list, list):
     for filename in filename_or_list:
       self.delete_file_or_list(filename)
   else:
     filename = filename_or_list
     for _ in range(10):
       try:
         files.delete(filename)
         break
       except:
         pass