From 79dbde2413d8ece0986e89462f1ebffef4d51e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?GOLDERWEB=20=E2=80=93=20Jonathan=20Golder?= Date: Tue, 23 Aug 2016 21:23:24 +0200 Subject: [PATCH] Provide Replacement to @deprecated() as str Since use of pywikibot-master (or Python3.5 @see ticket below) the @deprecator requires a str as param and no callable object like done before Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=69 FS#69] --- redfam.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/redfam.py b/redfam.py index 0e316a7..3dec12f 100644 --- a/redfam.py +++ b/redfam.py @@ -308,8 +308,8 @@ class RedFamParser( RedFam ): """ # On archived red_fams do not delete possibly existing ending - if( not self._ending and self._status > 1 - and self.__mysql.data[ 'ending' ] ): + if( not self._ending and self._status > 1 and + self.__mysql.data[ 'ending' ] ): self._ending = self.__mysql.data[ 'ending' ] @@ -405,7 +405,7 @@ class RedFamParser( RedFam ): return (beginning, ending) @classmethod - @deprecated( extract_dates ) + @deprecated( 'extract_dates' ) def is_beginning( cls, line ): """ Returns the first timestamp found in line, otherwise None @@ -418,7 +418,7 @@ class RedFamParser( RedFam ): return cls.extract_dates( line )[0] @classmethod - @deprecated( extract_dates ) + @deprecated( 'extract_dates' ) def is_ending( cls, line, isarchive=False ): """ Returns the timestamp of done notice ( if one ), otherwise None @@ -435,7 +435,7 @@ class RedFamParser( RedFam ): return cls.extract_dates( line )[1] @classmethod - @deprecated( extract_dates ) + @deprecated( 'extract_dates' ) def is_ending2( cls, line ): """ Returns the last timestamp found in line, otherwise None