Changeset - 7777a6f70fd5
[Not reviewed]
0 3 0
Lance Edgar - 9 years ago 2015-08-17 12:43:26
ledgar@sacfoodcoop.com
Remove deprecated `RattailConfig.getboolean()` method.

All calling code should be refactored, I believe..
3 files changed with 8 insertions and 13 deletions:
0 comments (0 inline, 0 general)
docs/narr/filemon.rst
Show inline comments
 
@@ -310,9 +310,9 @@ It is for this type of situation that the "process_existing" option exists:
 
   foo.process_existing = false
 

	
 
Technically the value of this option could be anything supported by the
 
:meth:`python:ConfigParser.RawConfigParser.getboolean()` method, but in
 
practice it is conventionally set to "false" or else omitted entirely (as it is
 
enabled by default).
 
:meth:`rattail.config.RattailConfig.getbool()` method, but in practice it is
 
conventionally set to "false" or else omitted entirely (as it is enabled by
 
default).
 

	
 
Note also that this option applies at the *profile* level, and is not specific
 
to any particular watched folder.  If you need different behavior for different
 
@@ -363,9 +363,9 @@ action level.  As of this writing, the action-level granularity has not been
 
needed, although it may be added in the future.
 

	
 
Technically the value of this option could be anything supported by the
 
:meth:`python:ConfigParser.RawConfigParser.getboolean()` method, but in
 
practice it is conventionally set to "true" or else omitted entirely (as it is
 
disabled by default).
 
:meth:`rattail.config.RattailConfig.getbool()` method, but in practice it is
 
conventionally set to "true" or else omitted entirely (as it is disabled by
 
default).
 

	
 

	
 
.. _filemon-profile-actions:
rattail/config.py
Show inline comments
 
@@ -246,11 +246,6 @@ class RattailConfig(object):
 
            return True
 
        return False
 

	
 
    def getboolean(self, *args, **kwargs):
 
        warnings.warn("RattailConfig.getboolean() is deprecated, please use getbool() instead.",
 
                      DeprecationWarning)
 
        return self.getbool(*args, **kwargs)
 

	
 
    def getint(self, *args, **kwargs):
 
        """
 
        Retrieve an integer value from config.
rattail/filemon/config.py
Show inline comments
 
@@ -209,8 +209,8 @@ class Profile(object):
 
        return action
 

	
 
    def _config_boolean(self, option, default=None):
 
        return self.config.getboolean(
 
            u'rattail.filemon', u'{0}.{1}'.format(self.key, option), default=default)
 
        return self.config.getbool('rattail.filemon', '{0}.{1}'.format(self.key, option),
 
                                   default=default)
 

	
 
    def _config_int(self, option, minimum=0):
 
        option = u'{0}.{1}'.format(self.key, option)
0 comments (0 inline, 0 general)