Revision db859c7d

b/autotools/check-python-code
1 1
#!/bin/bash
2 2
#
3 3

  
4
# Copyright (C) 2009 Google Inc.
4
# Copyright (C) 2009, 2011 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
20 20

  
21 21
set -e
22 22

  
23
# Ensure the checks always use the same locale
24
export LC_ALL=C
25

  
23 26
readonly maxlinelen=$(for ((i=0; i<81; ++i)); do echo -n .; done)
24 27

  
25 28
if [[ "${#maxlinelen}" != 81 ]]; then
......
58 61
    let ++problems
59 62
    echo "Longest line in $script is longer than 80 characters" >&2
60 63
  fi
64

  
65
  if grep -n -H -E -i \
66
    '#.*\bpylint[[:space:]]*:[[:space:]]*disable-msg\b' "$script"
67
  then
68
    let ++problems
69
    echo "Found old-style pylint disable pragma in $script" >&2
70
  fi
61 71
done
62 72

  
63 73
if [[ "$problems" -gt 0 ]]; then
b/test/ganeti.asyncnotifier_unittest.py
28 28
import shutil
29 29

  
30 30
try:
31
  # pylint: disable-msg=E0611
31
  # pylint: disable=E0611
32 32
  from pyinotify import pyinotify
33 33
except ImportError:
34 34
  import pyinotify

Also available in: Unified diff