Browse files

update

  • Loading branch information...
1 parent f148e92 commit d0470f16b7cbf424c1b62e6bf091089c5e8a5961 @d1ffuz0r committed Dec 18, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 api2ch.py
View
6 api2ch.py
@@ -10,10 +10,10 @@
import json
import os
try:
- from urllib2 import urlopen
+ from urllib2 import urlopen, HTTPError
from urllib import urlencode
except ImportError:
- from urllib.request import urlopen
+ from urllib.request import urlopen, HTTPError
from urllib.parse import urlencode
from functools import reduce
@@ -250,7 +250,7 @@ def send_post(self, msg): # pragma: no cover
url = os.path.join(self._url, self.board, '/wakaba.pl')
urlopen(url, data=post)
return True
- except urllib2.HTTPError as e:
+ except HTTPError as e:
print('Error send post: {msg}'.format(msg=e))
def __repr__(self):

0 comments on commit d0470f1

Please sign in to comment.