chiark / gitweb /
adt-run: remove python string exceptions
[autopkgtest.git] / runner / adt-run
index 1b7f90003cd9ddfcec4d82e341669efaae342d5f..f935f3fe1ed86658ae9418d6f860043259292d28 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.4
+#!/usr/bin/python2.6
 #
 # adt-run is part of autopkgtest
 # autopkgtest is a tool for testing Debian binary packages
@@ -261,7 +261,7 @@ class AutoFile:
        xtra = ''
        if p.spec is not None:
                xtra = ' spec[%s]=%s' % (p.spec, getattr(p,'spec_tb',None))
-       raise ("internal error: %s (%s)" % (how, str(p)))
+       raise Exception("internal error: %s (%s)" % (how, str(p)))
 
  def _ensure_path(p, tbp):
        if p.path[tbp] is None:
@@ -644,7 +644,7 @@ def parse_args():
                elif type(act) == str:
                        act = (act,act)
                else:
-                       raise ("unknown action in list `%s' having"
+                       raise Exception("unknown action in list `%s' having"
                              " type `%s'" % (act, type(act)))
                (pathstr, kindpath) = act
 
@@ -1016,9 +1016,9 @@ class Restriction_rw_build_tree(Restriction): pass
 class Restriction_build_neeeded(Restriction): pass
 class Restriction_breaks_testbed(Restriction):
  def __init__(r, rname, base):
-       if 'revert' not in testbed.caps:
+       if 'revert-full-system' not in testbed.caps:
                raise Unsupported(f.lno,
-                       'Test breaks testbed but testbed cannot revert')
+       'Test breaks testbed but testbed does not advertise revert-full-system')
 class Restriction_needs_root(Restriction):
  def __init__(r, rname, base):
        if 'root-on-testbed' not in testbed.caps: