Remove custom hacking rules
The two hacking rules, no_log_warn and no_os_popen, have existed in base nova for quite some time. Removing them. Change-Id: I95c7c3b80f3bbeaae931d6842959d89ad0442e30
This commit is contained in:
parent
aa8ce81026
commit
9b3abb325b
|
@ -17,29 +17,5 @@
|
|||
from nova.hacking import checks
|
||||
|
||||
|
||||
def no_log_warn(logical_line, filename):
|
||||
"""Disallow 'LOG.warn('
|
||||
|
||||
"""
|
||||
if logical_line.startswith('LOG.warn('):
|
||||
yield(0, 'P301 Use LOG.warning() rather than LOG.warn()')
|
||||
|
||||
|
||||
def no_os_popen(logical_line):
|
||||
"""Disallow 'os.popen('
|
||||
|
||||
Deprecated library function os.popen() Replace it using subprocess
|
||||
https://bugs.launchpad.net/tempest/+bug/1529836
|
||||
|
||||
P302
|
||||
"""
|
||||
|
||||
if 'os.popen(' in logical_line:
|
||||
yield(0, 'P302 Deprecated library function os.popen(). '
|
||||
'Replace it using subprocess module. ')
|
||||
|
||||
|
||||
def factory(register):
|
||||
register(no_log_warn)
|
||||
register(no_os_popen)
|
||||
checks.factory(register)
|
||||
|
|
Loading…
Reference in New Issue