1. Chris Mulligan
  2. librarypaste-tools

Commits

Chris Mulligan  committed e11907c

0.0.3 - now only sets the basename for files, instead of showing the path.

  • Participants
  • Parent commits 36b0794
  • Branches default
  • Tags 0.0.3

Comments (0)

Files changed (2)

File lpaste/lpaste/lpaste.py

View file
 from optparse import OptionParser
 import ConfigParser
 from getpass import getuser
-from poster.encode import multipart_encode
+from poster.encode import multipart_encode, MultipartParam
 from poster.streaminghttp import register_openers
 import urllib2
 import webbrowser
 	if not options.longurl:
 		data['makeshort'] = 'True'
 	if options.attach:
-		data['file'] = fh
+		data = data.items()
+		data.append(MultipartParam.from_file('file', filename))
 		datagen, headers = multipart_encode(data)
 		headers.update(BASE_HEADERS)
 	else:

File lpaste/setup.py

View file
 from setuptools import setup
 
 setup(name="lpaste",
-	version="0.0.2",
+	version="0.0.3",
 	packages=['lpaste'],
 	entry_points = {
 		'console_scripts': [