CapPaste: check the contents in can_post
For pastealacon, it is used to check for encoding compatibility.
This commit is contained in:
parent
56fe4448d3
commit
0d2148bd84
6 changed files with 32 additions and 22 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue