Permalink
Browse files

Sends urlencoded data.

  • Loading branch information...
1 parent 6a41b0f commit fcec395e40352c17815fcd1584ade731dbb39627 Jukka Ojaniemi committed Oct 16, 2011
Showing with 21 additions and 3 deletions.
  1. +12 −0 CHANGES.txt
  2. +7 −2 setup.py
  3. +2 −1 src/buildout/sendpickedversions/__init__.py
View
@@ -0,0 +1,12 @@
+Changelog
+=========
+
+0.2 (2011-10-16)
+----------------
+
+- Sends data urlencoded.
+
+0.1 (2011-10-16)
+----------------
+
+- Initial import
View
@@ -1,8 +1,13 @@
# -*- coding: utf-8 -*-
+import os
import sys
from setuptools import setup, find_packages
-version = "0.1"
+here = os.path.abspath(os.path.dirname(__file__))
+README = open(os.path.join(here, 'README.rst')).read()
+CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
+
+version = "0.2"
entry_point = 'buildout.sendpickedversions:install'
entry_points = {"zc.buildout.extension": ["default = %s" % entry_point]}
@@ -16,7 +21,7 @@
setup(name='buildout.sendpickedversions',
version=version,
description="Sends picked packages and versions to a whiskers server.",
- long_description=open('README.rst','r').read(),
+ long_description=README + '\n\n' + CHANGES,
classifiers=[
'Framework :: Buildout',
'Intended Audience :: Developers',
@@ -4,6 +4,7 @@
except ImportError:
import simplejson as json
import urllib2
+import urllib
import zc.buildout.easy_install
import pkg_resources
@@ -66,7 +67,7 @@ def logging_shutdown():
return logging_shutdown
def send_picked_versions_data(whiskers_url, data):
- req = urllib2.Request(url=whiskers_url, data=data)
+ req = urllib2.Request(url=whiskers_url, data=urllib.urlencode({'data':data}))
try:
h = urllib2.urlopen(req, timeout=5)
except TypeError, e:

0 comments on commit fcec395

Please sign in to comment.