mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-06 05:00:23 +03:00
Fixed rpcerror generation when error.has_captures
This commit is contained in:
parent
396ec908dd
commit
3c248341a1
|
@ -35,12 +35,13 @@ def generate_errors(errors, f):
|
||||||
.format(error.capture_name))
|
.format(error.capture_name))
|
||||||
|
|
||||||
f.write('super(Exception, self).__init__('
|
f.write('super(Exception, self).__init__('
|
||||||
'{} + self._fmt_request(request)'
|
'{}'.format(repr(error.description)))
|
||||||
.format(repr(error.description)))
|
|
||||||
|
|
||||||
if error.has_captures:
|
if error.has_captures:
|
||||||
f.write('.format(self.{})'.format(error.capture_name))
|
f.write('.format(self.{})'.format(error.capture_name))
|
||||||
|
|
||||||
|
f.write(' + self._fmt_request(request)')
|
||||||
|
|
||||||
f.write(')\n')
|
f.write(')\n')
|
||||||
|
|
||||||
# Create the actual {CODE: ErrorClassName} dict once classes are defined
|
# Create the actual {CODE: ErrorClassName} dict once classes are defined
|
||||||
|
|
Loading…
Reference in New Issue
Block a user