CapPaste: check the contents in can_post

For pastealacon, it is used to check for encoding compatibility.
This commit is contained in:
Laurent Bachelier 2011-05-04 23:50:58 +02:00
commit 0d2148bd84
6 changed files with 32 additions and 22 deletions

View file

@ -63,7 +63,7 @@ class PastebinBackend(BaseBackend, BasePasteBackend):
def new_paste(self, *args, **kwargs):
return PastebinPaste(*args, **kwargs)
def can_post(self, public=None, max_age=None):
def can_post(self, contents, public=None, max_age=None):
if max_age is not None:
if self.get_closest_expiration(max_age) is None:
return 0