python3: urlencode is in a different module

import urlencode from urllib.parse if neeeded for python3.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-02-05 12:06:18 +01:00
parent 8b6af63d83
commit 93f4a19778

View File

@ -13,7 +13,10 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
from urllib import urlencode
try:
from urllib import urlencode
except ImportError: # python3
from urllib.parse import urlencode
import sys
import time
import logging