Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit c458a34

Browse files
committed
Use HTML Formatter as default formatter for telegram handler
1 parent 5f1cdc5 commit c458a34

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
History
44
-------
55

6+
1.1.1 (2016-04-20)
7+
++++++++++++++++++
8+
9+
* Use HTML Formatter as default formatter for telegram handler
10+
611
1.1.0 (2016-04-20)
712
++++++++++++++++++
813

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
setup(
88
requires=['requests'],
99
name='python-telegram-handler',
10-
version='1.1',
10+
version='1.1.1',
1111
packages=['telegram_handler'],
1212
url='https://github.com/sashgorokhov/python-telegram-handler',
1313
download_url='https://github.com/sashgorokhov/python-telegram-handler/archive/master.zip',

telegram_handler/handlers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
except ImportError:
88
import urlparse as parse
99

10-
from telegram_handler.formatters import MarkdownFormatter
10+
from telegram_handler.formatters import HtmlFormatter
1111

1212
logger = logging.getLogger(__name__)
1313

@@ -28,7 +28,7 @@ def __init__(self, token, chat_id, disable_notification=False, disable_web_page_
2828

2929
super(TelegramHandler, self).__init__(level=level)
3030

31-
self.formatter = MarkdownFormatter()
31+
self.formatter = HtmlFormatter()
3232

3333
@classmethod
3434
def formatUrl(cls, token, method):
@@ -40,7 +40,7 @@ def make_request(self, url, data):
4040
"""
4141
logger.debug(str(data))
4242
try:
43-
response = requests.post(self.url, data=data)
43+
response = requests.post(self.url, data=data, timeout=self.timeout)
4444
except:
4545
logger.exception('Error while making POST %s', url)
4646
return None

0 commit comments

Comments
 (0)