Remove trailing slash from pynag_directory

6 views
Skip to first unread message

Abhinav Upadhyay

unread,
Aug 3, 2012, 5:43:44 AM8/3/12
to pynag-...@googlegroups.com
Hi,

The pynag_directory variable in __init__.py in the Model module has a trailing slash at its end. This causes the get_suggested_filename() method to product bogus path name. This needs to be fixed. Following patch might be one way to do it:

diff --git a/pynag/Model/__init__.py b/pynag/Model/__init__.py
index 2b3e42e..7d92eea 100644
--- a/pynag/Model/__init__.py
+++ b/pynag/Model/__init__.py
@@ -53,7 +53,7 @@ import all_attributes
 cfg_file = None  # '/etc/nagios/nagios.cfg'
 
 # Were new objects are written by default
-pynag_directory = '/etc/nagios/pynag/'
+pynag_directory = '/etc/nagios/pynag'

Thanks
Abhinav

Páll Sigurðsson

unread,
Aug 3, 2012, 6:18:15 AM8/3/12
to pynag-...@googlegroups.com
Thanks,

We now have a github repo up at https://github.com/pynag so if you are proficient with git you can also send us a pull request.

Kind regards,
Pall

Abhinav Upadhyay

unread,
Aug 3, 2012, 9:45:13 AM8/3/12
to pynag-...@googlegroups.com
Ok, I will do that by tonight :-)

Thanks
Abhinav
Reply all
Reply to author
Forward
0 new messages