mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Errors: Fix passing 'self' to the constructors of the superclasses
This is necessary only if the superclass name is specified explicitly instead of super() call.
This commit is contained in:
@@ -68,7 +68,7 @@ def write_error(f, code, name, desc, capture_name):
|
||||
f.write(
|
||||
"self.{} = int(kwargs.get('capture', 0))\n ".format(capture_name)
|
||||
)
|
||||
f.write('super(Exception, self).__init__(self, {}'.format(repr(desc)))
|
||||
f.write('super(Exception, self).__init__({}'.format(repr(desc)))
|
||||
if capture_name:
|
||||
f.write('.format(self.{})'.format(capture_name))
|
||||
f.write(')\n')
|
||||
|
Reference in New Issue
Block a user