Commits

Diego Búrigo Zacarão  committed 7cf9515

A round of fixes to the VCS exception changes

  • Participants
  • Parent commits fcfad35

Comments (0)

Files changed (4)

File transifex/vcs/lib/exceptions/__init__.py

 
     def get_user_message(self, with_details=True):
         if with_details:
-            return "%s Details from the VCS backend: '%s'." % (self.user_message, self.original_exception)
+            return "%s Details from the VCS backend: '%s'." % (
+                self.user_message, self.original_exception)
         else:
             return user_message
 
 class UpdateRepoError(BaseVCSError):
     message = "Update/Pull from remote repository failed"
     user_message = _("Unable to pull data from the remote repository. Is the"
-        "remote host up?")
+        " remote host up?")
     notify_maintainers = True
 
 

File transifex/vcs/lib/types/bzr.py

             self.work_tree = self.repo.create_checkout(
                 self.path, lightweight=True, accelerator_tree=remote_work_tree)
         except Exception, e:
+            self.teardown_repo()
             raise SetupRepoError(e)
 
     def init_repo(self):

File transifex/vcs/lib/types/hg.py

             remote_repo, repo = hg.clone(ui, self.remote_path, self.path,
                                          update=True)
         except Exception, e:
+            self.teardown_repo()
             raise SetupRepoError(e)
 
 

File transifex/vcs/lib/types/svn.py

             self.client.checkout(self.remote_path, self.path,
                 ignore_externals=True)
         except Exception, e:
+            self.teardown_repo()
             raise SetupRepoError(_exception_handler(e))