Package: autopkgtest
Version: 2.0.1
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch precise

Hello,

I just converted upower to DEP8, i. e. added an autopkgtest control
file. I noticed that when running adt-run as non-root, I get:

0 (master) martin@donald:~/debian/pkg-utopia/upower
$ adt-run --built-tree . --- adt-virt-null
[...]
adt-run: unexpected, exceptional, error:
Traceback (most recent call last):
  File "/usr/bin/adt-run", line 1833, in main
    process_actions()
  File "/usr/bin/adt-run", line 1813, in process_actions
    stanzas = read_control(act, act.af, control_override)
  File "/usr/bin/adt-run", line 1274, in read_control
    f.parse()
  File "/usr/bin/adt-run", line 1036, in parse
    r = rclass(nrname, f.base)
  File "/usr/bin/adt-run", line 1025, in __init__
    raise Unsupported(f.lno,
NameError: global name 'f' is not defined
adt-run: trace: ** stop
adt-run: trace: ** close, 
scratch=tb-scratch~/tmp/tmp.Ebg5Svqnrh:-/|/tmp/tmp.Ebg5Svqnrh/!

Simple patch attached. It just drops the line number, as in that
context we don't have any open file.

Thanks for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
--- /usr/bin/adt-run.orig	2011-11-07 10:40:44.557222744 +0100
+++ /usr/bin/adt-run	2011-11-07 10:42:07.977225916 +0100
@@ -1017,12 +1017,12 @@
 class Restriction_breaks_testbed(Restriction):
  def __init__(r, rname, base):
 	if 'revert-full-system' not in testbed.caps:
-		raise Unsupported(f.lno,
+		raise Unsupported(-1,
 	'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:
-		raise Unsupported(f.lno,
+		raise Unsupported(-1,
 			'Test needs root on testbed which is not available')
 
 class Field_Restrictions(FieldBase):

Attachment: signature.asc
Description: Digital signature

Reply via email to