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

Commit

Permalink
Use HTML Formatter as default formatter for telegram handler
Browse files Browse the repository at this point in the history
  • Loading branch information
sashgorokhov committed Apr 20, 2016
1 parent 5f1cdc5 commit c458a34
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
History
-------

1.1.1 (2016-04-20)
++++++++++++++++++

* Use HTML Formatter as default formatter for telegram handler

1.1.0 (2016-04-20)
++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
setup(
requires=['requests'],
name='python-telegram-handler',
version='1.1',
version='1.1.1',
packages=['telegram_handler'],
url='https://github.com/sashgorokhov/python-telegram-handler',
download_url='https://github.com/sashgorokhov/python-telegram-handler/archive/master.zip',
Expand Down
6 changes: 3 additions & 3 deletions telegram_handler/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
except ImportError:
import urlparse as parse

from telegram_handler.formatters import MarkdownFormatter
from telegram_handler.formatters import HtmlFormatter

logger = logging.getLogger(__name__)

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

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

self.formatter = MarkdownFormatter()
self.formatter = HtmlFormatter()

@classmethod
def formatUrl(cls, token, method):
Expand All @@ -40,7 +40,7 @@ def make_request(self, url, data):
"""
logger.debug(str(data))
try:
response = requests.post(self.url, data=data)
response = requests.post(self.url, data=data, timeout=self.timeout)
except:
logger.exception('Error while making POST %s', url)
return None
Expand Down

0 comments on commit c458a34

Please sign in to comment.