Skip to content

Commit c4d5eff

Browse files
committed
move botan from utils to ext
1 parent f45ecee commit c4d5eff

2 files changed

Lines changed: 8 additions & 14 deletions

File tree

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1-
#!/usr/bin/env python
2-
31
import logging
42
from telegram import NullHandler
53

6-
try:
7-
from urllib.request import urlopen, Request
8-
from urllib.parse import quote
9-
from urllib.error import URLError, HTTPError
10-
except ImportError:
11-
from urllib2 import urlopen, Request
12-
from urllib import quote
13-
from urllib2 import URLError, HTTPError
4+
from future.moves.urllib.parse import quote
5+
from future.moves.urllib.error import HTTPError, URLError
6+
from future.moves.urllib.request import urlopen, Request
147

158
logging.getLogger(__name__).addHandler(NullHandler())
169

1710

1811
class Botan(object):
19-
"""This class helps to send incoming events in your botan analytics account.
20-
See more: https://github.com/botanio/sdk#botan-sdk"""
12+
"""This class helps to send incoming events to your botan analytics account.
13+
See more: https://github.com/botanio/sdk#botan-sdk
14+
"""
2115

2216
token = ''
2317
url_template = 'https://api.botan.io/track?token={token}' \

tests/test_botan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
"""This module contains a object that represents Tests for Botan analytics integration"""
2+
"""This module contains an object that represents Tests for Botan analytics integration"""
33

44
import sys
55
import unittest
@@ -9,7 +9,7 @@
99

1010
sys.path.append('.')
1111

12-
from telegram.utils.botan import Botan
12+
from telegram.ext.botan import Botan
1313
from tests.base import BaseTest
1414

1515

0 commit comments

Comments
 (0)