CapPaste: Support expiration for posting, as a max_age parameter

This commit is contained in:
Laurent Bachelier 2011-04-30 00:26:23 +02:00
commit f63180c187
10 changed files with 71 additions and 27 deletions

View file

@ -102,8 +102,8 @@ class Pastoob(ReplApplication):
p.public = params.get('public')
p.title = os.path.basename(filename)
p.contents = contents
backend.post_paste(p)
backend.post_paste(p, max_age=params.get('max_age'))
print 'Successfuly posted paste: %s' % p.page_url
def _get_params(self):
return {'public': True}
return {'public': True, 'max_age': 3600*24*3}