Beispiel #1
0
 def remove_target_dir(self, associated_task=None):
     if not os.path.isdir(self.info.previous_target_dir):
         log.debug("Cannot find %s" % self.info.previous_target_dir)
         return
     log.debug("Deleting %s" % self.info.previous_target_dir)
     try:
         rm_tree(self.info.previous_target_dir)
     except OSError, e:
         if e.errno == 22:
             log.exception('Unable to remove the target directory.')
             # Invalid argument - likely a corrupt file.
             cmd = spawn_command(['chkdsk', '/F'])
             cmd.communicate(input='Y%s' % os.linesep)
             raise errors.WubiCorruptionError
Beispiel #2
0
 def remove_target_dir(self, associated_task=None):
     if not os.path.isdir(self.info.previous_target_dir):
         log.debug("Cannot find %s" % self.info.previous_target_dir)
         return
     log.debug("Deleting %s" % self.info.previous_target_dir)
     try:
         rm_tree(self.info.previous_target_dir)
     except OSError, e:
         if e.errno == 22:
             log.exception('Unable to remove the target directory.')
             # Invalid argument - likely a corrupt file.
             cmd = spawn_command(['chkdsk', '/F'])
             cmd.communicate(input='Y%s' % os.linesep)
             raise errors.WubiCorruptionError