[Pki-devel] [PATCH] 59 Fixing errors reported in Pylint Code analysis Ticket #316 - Part 1

Abhishek Koneru akoneru at redhat.com
Fri May 31 20:38:09 UTC 2013


Please review the patch which fixes a few errors reported by pylint in
dogtag's python code.

Also find attached the remaining errors to be fixed. Will submit a
detailed report in my next mail.

How i used pylint: 

  -- Installed pki packages.
  -- Executed the following command - 
     cd /usr/lib/python2.7/sitepackages; pylint -E --include-ids=y pki/
pki/deployment/ pki/server/ `which pkispawn` `which pkidestroy` `which
pki-upgrade` `which pki-server-upgrade`

--Abhishek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pki-akoneru-0059-Code-cleanup-and-fixing-Pylint-errors.patch
Type: text/x-patch
Size: 114295 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/pki-devel/attachments/20130531/74afc3aa/attachment.bin>
-------------- next part --------------
[root at akoneru pki]# pylint -E --include-ids=y pki/ pki/deployment/ pki/server/ `which pkispawn` `which pkidestroy` `which pki-upgrade` `which pki-server-upgrade` 


************* Module encoder
E0202: 16,4:CustomTypeEncoder.default: An attribute affected in json.encoder line 157 hide this method


************* Module deployment.pkihelper
E0602:117,15:pki_copytree: Undefined variable 'Error'
E0602:124,11:pki_copytree: Undefined variable 'WindowsError'
E0602:124,56:pki_copytree: Undefined variable 'WindowsError'
E0602:130,14:pki_copytree: Undefined variable 'Error'
E0602:1004,15:Instance.tomcat_instance_subsystems: Undefined variable 'OSErr'
E0602:3332,28:Config_client.set_system_certs: Undefined variable 'self'


************* Module deployment.pkiparser
E0602:153,16:PKIConfigParser.validate: Undefined variable 'parser'
E0602:154,16:PKIConfigParser.validate: Undefined variable 'parser'
E1101:185,34:PKIConfigParser.init_config: Module 'deployment.pkiconfig' has no 'pki_dns_domainname' member
E1101:438,16:PKIConfigParser.compose_pki_master_dictionary: Module 'deployment.pkiconfig' has no 'pki_certificate_timestamp' member


************* Module deployment.configuration
E0602:115,23:PkiScriptlet.spawn: Undefined variable 'rv'
E0602:120,23:PkiScriptlet.spawn: Undefined variable 'rv'


************* Module deployment.finalization
E1120: 57,8:PkiScriptlet.spawn: No value passed for parameter 'name' in function call
E1120: 58,8:PkiScriptlet.spawn: No value passed for parameter 'self' in function call
E0602:117,15:pki_copytree: Undefined variable 'Error'
E0602:124,11:pki_copytree: Undefined variable 'WindowsError'
E0602:124,56:pki_copytree: Undefined variable 'WindowsError'
E0602:130,14:pki_copytree: Undefined variable 'Error'
E0602:1004,15:Instance.tomcat_instance_subsystems: Undefined variable 'OSErr'
E0602:3332,28:Config_client.set_system_certs: Undefined variable 'self'
E0602:153,16:PKIConfigParser.validate: Undefined variable 'parser'
E0602:154,16:PKIConfigParser.validate: Undefined variable 'parser'
E1101:185,34:PKIConfigParser.init_config: Module 'deployment.pkiconfig' has no 'pki_dns_domainname' member
E1101:438,16:PKIConfigParser.compose_pki_master_dictionary: Module 'deployment.pkiconfig' has no 'pki_certificate_timestamp' member
E0602:115,23:PkiScriptlet.spawn: Undefined variable 'rv'
E0602:120,23:PkiScriptlet.spawn: Undefined variable 'rv'
E1120: 57,8:PkiScriptlet.spawn: No value passed for parameter 'name' in function call
E1120: 58,8:PkiScriptlet.spawn: No value passed for parameter 'self' in function call



More information about the Pki-devel mailing list