makanakoeln / check_mk

check_mk related scripts and checks
GNU General Public License v3.0
4 stars 2 forks source link

error in comment_author_alias.py #2

Closed gurubert closed 6 years ago

gurubert commented 6 years ago

The painter in comment_author_alias.py uses a obsoleted method. The following patch corrects this:

--- comment_author_alias.py.orig    2016-12-02 07:17:55.104039977 +0100
+++ comment_author_alias.py 2017-10-18 11:20:21.955279124 +0200
@@ -2,7 +2,7 @@
     user_alias_query = "GET contacts\n" \
                        "Columns: alias\n" \
                        "Filter: name = %s\n" % userid
-    user_alias = html.live.query(user_alias_query)
+    user_alias = sites.live().query(user_alias_query)
     if user_alias:
         return user_alias[0][0]
     else:
makanakoeln commented 6 years ago

Thanks, will fix this soon

makanakoeln commented 6 years ago

fixed

gurubert commented 6 years ago

Unfortunately you have missed the brackets after sites.live in the code published on https://github.com/makanakoeln/projects/blob/master/local/share/check_mk/web/plugins/views/comment_author_alias.py

makanakoeln commented 6 years ago

Hi, stupid mistake. Fixed that. thanks!