Skip to content
Snippets Groups Projects
  • Iustin Pop's avatar
    Run pylint over QA code too · 3582eef6
    Iustin Pop authored
    
    Right now, the QA code is not covered by pylint, and this shows at
    least one low-impact bug.
    
    This patch does the necessary changes to make QA pylint-clean, and the
    changes the makefile to run pylint for it.
    
    Notable changes:
    
    - qa_utils.GenericQueryTest: randfields was not used at all, and my
      belief is that it was indented to be used in order not to modify the
      input list; so I replaced randfields with fields, so we only shuffle
      the our local copy
    - qa_node.TestOutOfBand was using it's own copy of AcquireNode(), so I
      replaced it with the existing version
    - qa_os: was using 'dir' in a couple of places, replaced with dirname
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    3582eef6
qa_error.py 1.05 KiB
#
#

# Copyright (C) 2007 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.


"""Error definitions for QA.

"""

class Error(Exception):
  """An error occurred during Q&A testing.

  """
  pass


class OutOfNodesError(Error):
  """Out of nodes.

  """
  pass


class OutOfInstancesError(Error):
  """Out of instances.

  """
  pass


class UnusableNodeError(Error):
  """Unusable node.

  """
  pass