Rev 226: Fixed failing test. in http://bzr.daniel-watkins.co.uk/pqm/xmlrpc

Daniel Watkins daniel at daniel-watkins.co.uk
Fri Aug 1 04:35:12 BST 2008


At http://bzr.daniel-watkins.co.uk/pqm/xmlrpc

------------------------------------------------------------
revno: 226
revision-id: daniel at daniel-watkins.co.uk-20080801033334-cxo81u0wbfecvv8o
parent: daniel at daniel-watkins.co.uk-20080801033252-pirqlqrwlr4c5jff
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: xmlrpc-validation
timestamp: Fri 2008-08-01 04:33:34 +0100
message:
  Fixed failing test.
-------------- next part --------------
=== modified file 'pqm/script.py'
--- a/pqm/script.py	2008-08-01 03:09:42 +0000
+++ b/pqm/script.py	2008-08-01 03:33:34 +0000
@@ -430,8 +430,11 @@
         # TODO: Tim Penhey, 2008-05-28
         # Get rid of the imports from pqm module itself.
         from pqm import ArXHandler, Baz1_1Handler, popen_noshell, TlaHandler
-        if self.arch_impl is None:
-            arch_impl = None
+        try:
+            arch_impl = self.arch_impl
+        except AttributeError:
+            raise PQMException(None, 'No arch implementation has been set.')
+        if arch_impl is None:
             (status, msg, output) = popen_noshell(self.arch_path, '--version')
             for line in output:
                 if line.find('baz ') >= 0:
@@ -460,7 +463,10 @@
         handler = Bazaar2Handler()
         if handler.branch_exists(self.script.getSender(), branchspec):
             return handler
-        handler = self.get_arch_impl()
+        try:
+            handler = self.get_arch_impl()
+        except PQMException:
+            raise PQMException(None, '%s is not a branch' % (branchspec,))
         return handler
 
     def get_wd(self, sender, branch, config):



More information about the bazaar-commits mailing list