Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Fixed errors reported by pyLint #725

Merged
merged 4 commits into from
Nov 10, 2016
Merged

Fixed errors reported by pyLint #725

merged 4 commits into from
Nov 10, 2016

Conversation

msterin
Copy link
Contributor

@msterin msterin commented Nov 10, 2016

Fixes #721

Fixed issues reported by pylint (mainly in error handling paths).
Also added empty init.py files so pylint handles each folder as a module.

Opportunistically done the following:

  • fixed sqlite except: clauses to make them Py3 Compatible
  • fixed a set of alignment issues (please add ?w=1 to review URL to hide whitespace-only diff)
  • removed *pyc files which keep creeping in.
  • fixed GO issue with if {... ; return} else { ...} - Go recommends to drop else and remove useless offset.
  • added Dockerfile for pylint. It is a modified eea/lint , it is not hooked up to the build yet , I will finish the clean up of this file and integrate with build in a separate PR

test: CI only

//CC @lipingxue - please note except sqliteerror as e: conversion. If possible, wait with this change in your branch to avoid conflicts.

Copy link
Contributor

@pdhamdhere pdhamdhere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. Took a quick look. Since this mainly addresses issues reported by pylint with no functional changes, it's good to go.

@msterin
Copy link
Contributor Author

msterin commented Nov 10, 2016

//CC @kerneltime - please pay attention to the log message about rmdir failure in the test run (copied from the log here for convenience).
it was silently swallowed before due to bugs exposed by pylint

11/10/16 05:15:40 4482382 [MainThread] [WARNING] Directory clean up failed  -
/vmfs/volumes/vsan:52fe282b8b5a398c-e41bd80f9e940d46/dockvols, 
err: [Errno 38] Function not implemented: '/vmfs/volumes/vsan:52fe282b8b5a398c-e41bd80f9e940d46/dockvols'

The reason is using rmdirs() on test cleanup, when on VSAN we need to use osfs-rmdir (or better, use DatastoreNamespaceManager.DeleteDirectory() in VMOMI

Not sure if it's a problem for CI. Is it ?

@msterin msterin merged commit 752adfa into master Nov 10, 2016
@kerneltime kerneltime deleted the pylint.msterin branch November 11, 2016 20:47
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to fix errors found by pylint
4 participants