kimchi-project / gingers390x

Wok plug-in focused in s390x management
Other
6 stars 8 forks source link

make check-local fails for model/utils.py #7

Closed sureshab closed 8 years ago

sureshab commented 8 years ago

[suresh@localhost gingers390x]$ make check-local contrib/checki18n.py ./i18n.py Checking for invalid i18n string... Checking for invalid i18n string successfully find . -path './.git' -prune -type f -o \ -name '.py' -o -name '_.py.in' | xargs /usr/bin/pyflakes | \ while read LINE; do echo "$LINE"; false; done ./model/utils.py:130: undefined name 'sg_dev' Makefile:965: recipe for target 'check-local' failed make: *\ [check-local] Error 1

danielhb commented 8 years ago

Doesn't happen here:

[danielhb@arthas gingers390x]$ git branch
* master
[danielhb@arthas gingers390x]$ git pull
Already up-to-date.
[danielhb@arthas gingers390x]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
[danielhb@arthas gingers390x]$ make check-local
contrib/check_i18n.py ./i18n.py 
Checking for invalid i18n string...
Checking for invalid i18n string successfully
find . -path './.git' -prune -type f -o \
    -name '*.py' -o -name '*.py.in'  | xargs /bin/pyflakes | \
    while read LINE; do echo "$LINE"; false; done
/bin/pep8 --version
1.6.2
/bin/pep8 --filename '*.py,*.py.in' --exclude="*config.py,*i18n.py,*tests/test_config.py,*tests/test_config.py.in" .
[danielhb@arthas gingers390x]$ 
sureshab commented 8 years ago

@danielhb i am using fedora 21 on x86 machine with pep8 version 1.6.2. could you verify with cloning fresh copy?

surprisingly, with KVM on z, there was no error. [root@zfwcec103 gingers390x]# make check-local contrib/checki18n.py ./i18n.py Checking for invalid i18n string... Checking for invalid i18n string successfully find . -path './.git' -prune -type f -o \ -name '.py' -o -name '.py.in' | xargs /usr/bin/pyflakes | \ while read LINE; do echo "$LINE"; false; done /usr/bin/pep8 --version 1.6.2 /usr/bin/pep8 --filename '.py,_.py.in' --exclude="_config.py,_i18n.py,_tests/test_config.py,_tests/test_config.py.in" . [root@zfwcec103 gingers390x]#

danielhb commented 8 years ago

Same thing:

[danielhb@arthas kimchi]$ mkdir gingerZ_test
[danielhb@arthas kimchi]$ cd gingerZ_test/
[danielhb@arthas gingerZ_test]$ git clone https://github.com/kimchi-project/gingers390x.git
Cloning into 'gingers390x'...
remote: Counting objects: 300, done.
remote: Total 300 (delta 0), reused 0 (delta 0), pack-reused 300
Receiving objects: 100% (300/300), 142.64 KiB | 0 bytes/s, done.
Resolving deltas: 100% (164/164), done.
Checking connectivity... done.
[danielhb@arthas gingers390x]$
[danielhb@arthas gingers390x]$
[danielhb@arthas gingerZ_test]$ cd gingers390x/
[danielhb@arthas gingers390x]$ ./autogen.sh --system ; make
(...)
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/danielhb/kimchi/gingerZ_test/gingers390x/ui/pages'
make[3]: Leaving directory '/home/danielhb/kimchi/gingerZ_test/gingers390x/ui/pages'
make[3]: Entering directory '/home/danielhb/kimchi/gingerZ_test/gingers390x/ui'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/danielhb/kimchi/gingerZ_test/gingers390x/ui'
make[2]: Leaving directory '/home/danielhb/kimchi/gingerZ_test/gingers390x/ui'
make[2]: Entering directory '/home/danielhb/kimchi/gingerZ_test/gingers390x'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/home/danielhb/kimchi/gingerZ_test/gingers390x'
make[1]: Leaving directory '/home/danielhb/kimchi/gingerZ_test/gingers390x'
[danielhb@arthas gingers390x]$
[danielhb@arthas gingers390x]$
[danielhb@arthas gingers390x]$ make check-local
contrib/check_i18n.py ./i18n.py 
Checking for invalid i18n string...
Checking for invalid i18n string successfully
find . -path './.git' -prune -type f -o \
    -name '*.py' -o -name '*.py.in'  | xargs /usr/bin/pyflakes | \
    while read LINE; do echo "$LINE"; false; done
/usr/bin/pep8 --version
1.6.2
/usr/bin/pep8 --filename '*.py,*.py.in' --exclude="*config.py,*i18n.py,*tests/test_config.py,*tests/test_config.py.in" .
[danielhb@arthas gingers390x]$ 
danielhb commented 8 years ago

Seeing the code it kind of makes some sense why it should fail. The 'sg_dev' war inside the 'except' block isn't declared anywhere in the function.

Can you check which version of pyflakes are you running in your F21 with pyflakes --version ? I think I have a guess of why it is not failing ....

danielhb commented 8 years ago

In any case @sureshab please send a patch to models/utils.py if you want. We don't need pyflakes to see that the wok_log at line 130 is using an undefined variable.

sureshab commented 8 years ago

pyflakes version - 0.8.1 i discussed this issue with @harche , he will be sending patch.

tuwid commented 8 years ago

facing same issue

# make check-local
contrib/check_i18n.py ./i18n.py 
Checking for invalid i18n string...
Checking for invalid i18n string successfully
/usr/bin/pep8 --version
1.5.7
/usr/bin/pep8 --filename '*.py,*.py.in' --exclude="*config.py,*i18n.py,*tests/test_config.py" .
./tests/test_netinfo.py:120:16: E121 continuation line under-indented for hanging indent
./tests/test_netinfo.py:133:16: E121 continuation line under-indented for hanging indent
Makefile:1022: recipe for target 'check-local' failed
make: *** [check-local] Error 1
Radzhab commented 6 years ago

same issue