Commits

Anonymous committed 8d4828d

Use Python 2.4 syntax for try/except/finally.

Comments (0)

Files changed (1)

         ado = extensions.wrapfunction(patch, 'applydiff', adwrapper)
         files, success = {}, True
         try:
-            fuzz = patch.patch(self.join(patchfile), self.ui, strip = 1,
-                               cwd = repo.root, files = files)
-            patch.updatedir(self.ui, repo, files, similarity = sim/100.)
-        except Exception, inst:
-            self.ui.note(str(inst) + '\n')
-            if not self.ui.verbose:
-                self.ui.warn('patch failed, unable to continue (try -v)\n')
-            success = False
+            try:
+                fuzz = patch.patch(self.join(patchfile), self.ui, strip = 1,
+                                   cwd = repo.root, files = files)
+                patch.updatedir(self.ui, repo, files, similarity = sim/100.)
+            except Exception, inst:
+                self.ui.note(str(inst) + '\n')
+                if not self.ui.verbose:
+                    self.ui.warn('patch failed, unable to continue (try -v)\n')
+                success = False
         finally:
             patch.externalpatch = epo
             patch.applydiff = ado