From abc30707b53ef87d902295ef0b483038637e6fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?GOLDERWEB=20=E2=80=93=20Jonathan=20Golder?= Date: Mon, 9 Nov 2015 20:00:43 +0100 Subject: [PATCH] CountryList-Module: Implement method for checking if parsing is needed --- countrylist.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/countrylist.py b/countrylist.py index 14a8a11..0aa7bbd 100644 --- a/countrylist.py +++ b/countrylist.py @@ -74,3 +74,17 @@ class CountryList(): for attr in __attr: setattr( self, attr, None ) + def parsing_needed( self, revid ): + """ + Check if current revid of CountryList differs from given one + + @param int Revid to check against + + @return True Given revid differs from current revid + False Given revid is equal to current revid + """ + + if revid != self.page.latest_revision_id: + return True + else: + return False