#7420 linter throwing error for "ipaserver/install/certs.py"
Closed: worksforme 6 years ago Opened 6 years ago by amitkumar25nov.

Issue

# vim ipaserver/install/certs.py +131
modified something from:
"Unable to determine the current directory: %s" % str(e))
to
"test Unable to determine the current directory: %s" % str(e))
# ./autogen.sh
# make fastlint
(cd ./ipaplatform && make override.py)
make[1]: Entering directory '/root/freeipa/ipaplatform'
make[1]: 'override.py' is up to date.
make[1]: Leaving directory '/root/freeipa/ipaplatform'
(cd ./ipapython && make version.py)
make[1]: Entering directory '/root/freeipa/ipapython'
make[1]: 'version.py' is up to date.
make[1]: Leaving directory '/root/freeipa/ipapython'
Fast linting with /usr/bin/python from branch 'master'
Fast linting files:
ipaserver/install/certs.py

pycodestyle -----------

pylint ------
*** Module ipaserver.install.certs
ipaserver/install/certs.py:48: [E0611(no-name-in-module), ] No name 'paths' in module 'ipaserver.install.ipaplatform.paths')
ipaserver/install/certs.py:48: [W0403(relative-import), ] Relative import 'ipaplatform.paths', should be 'ipaserver.install.ipaplatform.paths')


Your code has been rated at 9.85/10

make: *** [Makefile:1174: fastlint] Error 6
#

Expected behavior

linter should not throw error

Version/Release/Distribution

freeipa-4.6.90


I cannot reproduce the issue locally. You might be running an older version of pylint. What's your OS and pylint version? In the past I have resolved such issues by adding from __future__ import absolute_import as first import.

PS: Don't work as root.

@amitkumar25nov Please provide the requested information.

[root@fedora26 freeipa]# rpm -qa | grep pylint
python3-pylint-1.7.4-1.fc26.noarch
python2-pylint-1.7.4-1.fc26.noarch
pylint-1.7.4-1.fc26.noarch
[root@fedora26 freeipa]# cat /etc/redhat-release
Fedora release 26 (Twenty Six)
[root@fedora26 freeipa]#

And yes its getting resolved by adding from __future__ import absolute_import

Metadata Update from @fbarreto:
- Issue close_status updated to: worksforme
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata