old_contents: #!/usr/bin/env python
  
  """
  The Resource Expert Droid State container.
  
  RedState holds all test-related state that's useful for analysis; ephemeral
  objects (e.g., the HTTP client machinery) are kept elsewhere.
  """
  
  __author__ = "Mark Nottingham <mnot@mnot.net>"
  __copyright__ = """\
  Copyright (c) 2008-2013 Mark Nottingham
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:
  
  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
  """
  
  import redbot.speak as rs
  
  class RedState(object):
      "Base class for things that have test state."
  
      def __init__(self, name):
          self.name = name
          self.notes = []
  
      def __repr__(self):
          status = [self.__class__.__module__ + "." + self.__class__.__name__]
          status.append("'%s'" % self.name)
          return "<%s at %#x>" % (", ".join(status), id(self))
  
      def __getstate__(self):
          return dict([(k,v) for k,v in self.__dict__.items() \
                        if not isinstance(v, types.MethodType)])
  
      def add_note(self, subject, note, subreq=None, **kw):
          "Set a note."
          kw['response'] = rs.response.get(
              self.check_type, rs.response['this']
          )['en']
          self.notes.append(note(subject, subreq, kw))
  
new_contents: #!/usr/bin/env python
  
  """
  The Resource Expert Droid State container.
  
  RedState holds all test-related state that's useful for analysis; ephemeral
  objects (e.g., the HTTP client machinery) are kept elsewhere.
  """
  
  __author__ = "Mark Nottingham <mnot@mnot.net>"
  __copyright__ = """\
  Copyright (c) 2008-2013 Mark Nottingham
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:
  
  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
  """
  
  import types
  
  import redbot.speak as rs
  
  class RedState(object):
      "Base class for things that have test state."
  
      def __init__(self, name):
          self.name = name
          self.notes = []
  
      def __repr__(self):
          status = [self.__class__.__module__ + "." + self.__class__.__name__]
          status.append("'%s'" % self.name)
          return "<%s at %#x>" % (", ".join(status), id(self))
  
      def __getstate__(self):
          return dict([(k, v) for k, v in self.__dict__.items() \
                        if not isinstance(v, types.MethodType)])
  
      def add_note(self, subject, note, subreq=None, **kw):
          "Set a note."
          kw['response'] = rs.response.get(
              self.name, rs.response['this']
          )['en']
          self.notes.append(note(subject, subreq, kw))
  
subject: clean up for pylint