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]
This commit is contained in:
10
redfam.py
10
redfam.py
@@ -308,8 +308,8 @@ class RedFamParser( RedFam ):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# On archived red_fams do not delete possibly existing ending
|
# On archived red_fams do not delete possibly existing ending
|
||||||
if( not self._ending and self._status > 1
|
if( not self._ending and self._status > 1 and
|
||||||
and self.__mysql.data[ 'ending' ] ):
|
self.__mysql.data[ 'ending' ] ):
|
||||||
|
|
||||||
self._ending = self.__mysql.data[ 'ending' ]
|
self._ending = self.__mysql.data[ 'ending' ]
|
||||||
|
|
||||||
@@ -405,7 +405,7 @@ class RedFamParser( RedFam ):
|
|||||||
return (beginning, ending)
|
return (beginning, ending)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@deprecated( extract_dates )
|
@deprecated( 'extract_dates' )
|
||||||
def is_beginning( cls, line ):
|
def is_beginning( cls, line ):
|
||||||
"""
|
"""
|
||||||
Returns the first timestamp found in line, otherwise None
|
Returns the first timestamp found in line, otherwise None
|
||||||
@@ -418,7 +418,7 @@ class RedFamParser( RedFam ):
|
|||||||
return cls.extract_dates( line )[0]
|
return cls.extract_dates( line )[0]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@deprecated( extract_dates )
|
@deprecated( 'extract_dates' )
|
||||||
def is_ending( cls, line, isarchive=False ):
|
def is_ending( cls, line, isarchive=False ):
|
||||||
"""
|
"""
|
||||||
Returns the timestamp of done notice ( if one ), otherwise None
|
Returns the timestamp of done notice ( if one ), otherwise None
|
||||||
@@ -435,7 +435,7 @@ class RedFamParser( RedFam ):
|
|||||||
return cls.extract_dates( line )[1]
|
return cls.extract_dates( line )[1]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@deprecated( extract_dates )
|
@deprecated( 'extract_dates' )
|
||||||
def is_ending2( cls, line ):
|
def is_ending2( cls, line ):
|
||||||
"""
|
"""
|
||||||
Returns the last timestamp found in line, otherwise None
|
Returns the last timestamp found in line, otherwise None
|
||||||
|
|||||||
Reference in New Issue
Block a user