File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -39,17 +39,12 @@ def setUp(self):
3939 def tearDown (self ):
4040 log .testing = True
4141
42- # Python 3's syntax for metaclasses is incompatible with Python 3 so
43- # using Python 3's syntax directly will raise a SyntaxError on Python 2.
44- exec ("""
45- class C(%s
46- __firewalled__ = {'foo': None}
47- class MyException(Exception):
48- pass
49- def foo(self):
50- raise self.MyException()""" %
51- ('metaclass=log.MetaFirewall):\n ' if minisix .PY3 else
52- 'object):\n __metaclass__ = log.MetaFirewall' ))
42+ class C (metaclass = log .MetaFirewall ):
43+ __firewalled__ = {'foo' : None }
44+ class MyException (Exception ):
45+ pass
46+ def foo (self ):
47+ raise self .MyException ()
5348
5449 def testCFooDoesNotRaise (self ):
5550 c = self .C ()
You can’t perform that action at this time.
0 commit comments