From 6c565e778f986055f0edd2a170e005f4adb45a5d Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 24 Jul 2012 22:38:48 +1200 Subject: Make previews safer by stripping pauses. --- libpathod/rparse.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libpathod/rparse.py') diff --git a/libpathod/rparse.py b/libpathod/rparse.py index e56135ea..d60a78d3 100644 --- a/libpathod/rparse.py +++ b/libpathod/rparse.py @@ -527,6 +527,12 @@ class Message: l += len(self.body) return l + def preview_safe(self): + """ + Modify this message to be safe for previews. + """ + self.actions = [i for i in self.actions if i[1] != "pause"] + def effective_length(self, actions): """ Calculate the length of the base message with all applied actions. -- cgit v1.2.3