From afdfbe4eed3f5e0aa6ab58d858a44309252fc2d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 24 May 2017 01:35:17 +0200 Subject: [PATCH] Update contrib/check-events for python 3 --- contrib/check-events | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/check-events b/contrib/check-events index 80a546f8..b15a79f6 100755 --- a/contrib/check-events +++ b/contrib/check-events @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 from __future__ import print_function from pprint import pprint @@ -103,7 +103,7 @@ class EventVisitor(ast.NodeVisitor): if name in ('qubes.events.handler', 'qubes.ext.handler'): # here we handle; event names (there may be more than one) are all # positional arguments - if node.starargs is not None: + if any(isinstance(arg, ast.Starred) for arg in node.args): raise AssertionError( 'event handler with *args in {} +{}'.format( self.filename, node.lineno))