16 lines
628 B
Diff
16 lines
628 B
Diff
|
http://genshi.edgewall.org/ticket/602#comment:2
|
||
|
|
||
|
diff --git a/genshi/template/directives.py b/genshi/template/directives.py
|
||
|
index 6fd0f28..1f70ef6 100644
|
||
|
--- a/genshi/template/directives.py
|
||
|
+++ b/genshi/template/directives.py
|
||
|
@@ -266,7 +266,7 @@ class DefDirective(Directive):
|
||
|
if isinstance(ast, _ast.Call):
|
||
|
self.name = ast.func.id
|
||
|
for arg in ast.args:
|
||
|
- if isinstance(arg, _ast.Starred):
|
||
|
+ if hasattr(_ast, 'Starred') and isinstance(arg, _ast.Starred):
|
||
|
# Python 3.5+
|
||
|
self.star_args = arg.value.id
|
||
|
else:
|