Merge branch 'master' into putfile

This commit is contained in:
Sebastian Lohff 2012-04-05 17:24:46 +02:00
commit a34c2bc5b8
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@
# Written by Sebastian Lohff (seba@seba-geek.de) # Written by Sebastian Lohff (seba@seba-geek.de)
# http://seba-geek.de/stuff/servefile/ # http://seba-geek.de/stuff/servefile/
__version__ = '0.3.1' __version__ = '0.3.2'
import argparse import argparse
import BaseHTTPServer import BaseHTTPServer
@ -114,7 +114,7 @@ def main():
try: try:
testit = open(args.filename, 'r') testit = open(args.filename, 'r')
testit.close() testit.close()
FileHandler.filePath = sys.argv[1] FileHandler.filePath = args.filename
FileHandler.fileName = os.path.basename(args.filename) FileHandler.fileName = os.path.basename(args.filename)
FileHandler.fileLength = os.stat(args.filename)[ST_SIZE] FileHandler.fileLength = os.stat(args.filename)[ST_SIZE]
except IOError: except IOError:

View File

@ -4,10 +4,10 @@ from distutils.core import setup
setup( setup(
name='servefile', name='servefile',
description='Script to serve files via a small HTTP server', description='Serve files from shell via a small HTTP server',
long_description='Script to serve files via a small HTTP server. The server redirects all http requests to the file, so only IP and port must be given to another user to access the file.', long_description='Serve files from shell via a small HTTP server. The server redirects all HTTP requests to the file, so only IP and port must be given to another user to access the file. Its main purpose is to quickly send a file to users in your local network, independent of their current setup (OS/software).',
platforms='posix', platforms='posix',
version='0.3.1', version='0.3.2',
license='GPLv3 or later', license='GPLv3 or later',
url='http://seba-geek.de/stuff/servefile/', url='http://seba-geek.de/stuff/servefile/',
author='Sebastian Lohff', author='Sebastian Lohff',