Unwanted output from Model.ObjectDefinitions.set_attribute()

9 views
Skip to first unread message

Abhinav Upadhyay

unread,
Aug 2, 2012, 6:05:53 AM8/2/12
to pynag-...@googlegroups.com
Hi, 

Consider following simple code:

from pynag import Model
h = Model.Host.objects.filter(host_name='localhost')
h.set_attribute('notifications_enabled', '0')
h.save()

The above code will produce an output as well on the stdout:
notifications_enabled 0 None

Since pynag is a library, its users would not like to see it producing output directly on stdout, rather this should either be a debug level output, returned as the value of the library function call or captured in an attribute of the object, like Host.error or so.

The users of the library might want to handle the output on stdout themselves and maybe this behavior should be fixed :-)

Thanks



Páll Sigurðsson

unread,
Aug 2, 2012, 12:02:19 PM8/2/12
to pynag-...@googlegroups.com
Thanks Abhinav,

Fixed&pushed

Abhinav Upadhyay

unread,
Aug 2, 2012, 12:08:57 PM8/2/12
to pynag-...@googlegroups.com
Thanks Páll :-)
Reply all
Reply to author
Forward
0 new messages