mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-18 15:20:42 +01:00
Tricky empty string in __init__
This commit is contained in:
parent
651119fd69
commit
38f2064639
1 changed files with 10 additions and 3 deletions
|
@ -40,13 +40,20 @@ class WebhookInfo(TelegramObject):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, url, has_custom_certificate, pending_update_count, **kwargs):
|
def __init__(self,
|
||||||
|
url,
|
||||||
|
has_custom_certificate,
|
||||||
|
pending_update_count,
|
||||||
|
last_error_date=None,
|
||||||
|
last_error_message=None,
|
||||||
|
**kwargs):
|
||||||
# Required
|
# Required
|
||||||
self.url = url
|
self.url = url
|
||||||
self.has_custom_certificate = has_custom_certificate
|
self.has_custom_certificate = has_custom_certificate
|
||||||
self.pending_update_count = pending_update_count
|
self.pending_update_count = pending_update_count
|
||||||
self.last_error_date = kwargs.get('last_error_date', '')
|
# Optional
|
||||||
self.last_error_message = kwargs.get('last_error_message', '')
|
self.last_error_date = last_error_date
|
||||||
|
self.last_error_message = last_error_message
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def de_json(data, bot):
|
def de_json(data, bot):
|
||||||
|
|
Loading…
Reference in a new issue