From 907ccad63ad7034eb9e5e45d17c9086a912a01cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?GOLDERWEB=20=E2=80=93=20Jonathan=20Golder?= Date: Fri, 11 Sep 2015 13:12:29 +0200 Subject: [PATCH] Detect if red_fam is archived but has no detectable ending, set status 2 anyway --- red_fam.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/red_fam.py b/red_fam.py index 76f087b..5ce43a3 100644 --- a/red_fam.py +++ b/red_fam.py @@ -190,12 +190,18 @@ class RED_FAM_PARSER( RED_FAM ): def status( self ): """ Handles detection of correct status + There are three possible stati: + - 0 Discussion is running --> no ending, page is not an archive + - 1 Discussion is over --> ending present, page is not an archive + - 2 Discussion is archived --> ending (normaly) present, page is an archive """ # Diskussion läuft --> Status ? --> 0 ! _ending # Diskussion beendet --> Status 0 --> 1 _ending # Diskussion archiviert --> Status 0/1 --> 2 ??? - if not self._ending: + # No ending, discussion is running: + # Sometimes archived discussions also have no detectable ending + if not self._ending and not self._red_page_archive: self._status = 0 else: if not self._red_page_archive: