Skip to content

Commit

Permalink
typo, usage and comment added
Browse files Browse the repository at this point in the history
  • Loading branch information
stgraber committed Nov 20, 2006
1 parent bb3adfa commit 8e98c4e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pastebinit
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@

import urllib, os, sys

#Check if a filename is passed as argument, otherwise show the usages
try:
filename=sys.argv[1]
except:
sys.exit("usage: "+sys.argv[0]+" [filename|\"-\"]"+"\n\nDefault pastebin: http://ubuntu.pastebin.com")
try:
website=sys.argv[2]
except:
website="http://ubuntu.pastebin.com"

#Read the content and put it into content

if filename == "-":
content=sys.stdin.read()
Expand All @@ -38,11 +37,19 @@ else:
except:
sys.exit("Unable to open : "+filename)

#Check if an extra pastebin was pasted as parameter

try:
website=sys.argv[2]
except:
website="http://ubuntu.pastebin.com"


user=os.environ.get('USER')

params={}

#Common fro pastebin.com and paste.ubuntu-nl.org
#Common for pastebin.com and paste.ubuntu-nl.org
params['poster']=user

#For pastebin.com
Expand Down

0 comments on commit 8e98c4e

Please sign in to comment.