[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#680954: pynag - looking good, couple of questions



Hi Jakub,

Thank you for the review!

I built new packages according to your package suggestions and uploaded to http://pall.sigurdsson.is/filez/pynag/ as pynag-0.4.2-2.

As for suggestions regarding software rather than just packaging, they are all valid. I will make sure this is fixed upstream.

Cheers!
Pall

On Tue, Jul 10, 2012 at 8:23 PM, Jakub Wilk <jwilk@debian.org> wrote:
* Clint Byrum <spamaps@debian.org>, 2012-07-10, 12:33:

Since pynag is a public python module, the package should be called python-pynag.

Right. Please see Python Policy §2.2 for details.

I had only cursory look at the package and spotted a few more problems:

Lintian reports:

W: pynag source: syntax-error-in-dep5-copyright line 8: Duplicate field copyright.
I: pynag source: debian-watch-file-is-missing
I: pynag: extended-description-is-probably-too-short
P: pynag: no-homepage-field

There's a comment in debian/rules: "This file was automatically generated by stdeb ..." Please remove this boilerplate.

"X-Python-Version" field is supposed to be a part of the source package stanza.

If you use dh_python2, versioned build-dependency on python should be bumped to ">= 2.6.6-3~".

The long package description starts and ends with empty lines. This is odd...

debian/links is empty. Just remove it.

usr/share/pyshared/pynag/Plugins/__init__.py:266 is indented with spaces, whereas all other lines in this file are indented with tabs.

In examples/Plugins/check_cpu.py:

current_load = os.popen("cat %s" % load_file).readline().split()[0]

Erm, seriously, spawning cat just to read a file? :)

In pynag/Model/__init__.py:

            try:
                i = Hostgroup.objects.get_by_shortname(i)
                if not i in result: result.append(i)
            except:
                pass # fail silently if nonexistent hostgroups are defined

This will swallow e.g. KeyboardInterrupt. In general, except without specifying exception type is almost always a bug, unless you re-raise the caught exception later. Please only catch exceptions you expect to be thrown.

(There are more cases of "except:" in the pynag codebase.)

--
Jakub Wilk




Reply to: