Update plugins/shorten.py
This commit is contained in:
parent
dcdc3341e3
commit
d5c81f6079
1 changed files with 17 additions and 22 deletions
|
@ -2,14 +2,9 @@
|
||||||
# <lukeroge@gmail.com> <https://github.com/lukeroge/CloudBot/>
|
# <lukeroge@gmail.com> <https://github.com/lukeroge/CloudBot/>
|
||||||
|
|
||||||
from util import hook, http
|
from util import hook, http
|
||||||
|
from re import match
|
||||||
try:
|
from urllib2 import urlopen, Request, HTTPError
|
||||||
from re import match
|
from urllib import urlencode
|
||||||
from urllib2 import urlopen, Request, HTTPError
|
|
||||||
from urllib import urlencode
|
|
||||||
|
|
||||||
except ImportError, e:
|
|
||||||
raise Exception('Required module missing: %s' % e.args[0])
|
|
||||||
|
|
||||||
class ShortenError(Exception):
|
class ShortenError(Exception):
|
||||||
def __init__(self, value):
|
def __init__(self, value):
|
||||||
|
|
Reference in a new issue