Skip to content

Commit

Permalink
remove last remaining use of __metaclass__ and simplify reraising
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Feb 12, 2017
1 parent cc07327 commit f7b0f66
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ZConfig/cfgparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from ZConfig.substitution import isname, substitute
from ZConfig._compat import reraise

class ZConfigParser:
__metaclass__ = type
class ZConfigParser(object):

__slots__ = ('resource', 'context', 'lineno',
'stack', 'defines', 'file', 'url')

Expand Down Expand Up @@ -171,9 +171,7 @@ def replace(self, text):

def error(self, message):
v = ZConfig.ConfigurationSyntaxError(message, self.url, self.lineno)
if sys.exc_info() and sys.exc_info()[2]:
reraise(type(v), v, sys.exc_info()[2])
raise v
reraise(type(v), v, sys.exc_info()[2])

def _normalize_case(self, string):
# This method is factored out solely to allow subclasses to modify
Expand Down

0 comments on commit f7b0f66

Please sign in to comment.