diff options
Diffstat (limited to 'doc/sr/weechat_plugin_api.sr.adoc')
-rw-r--r-- | doc/sr/weechat_plugin_api.sr.adoc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index 529cd8654..5bfe908cb 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -9029,9 +9029,9 @@ def my_process_cb(data, command, return_code, out, err): return weechat.WEECHAT_RC_OK if return_code >= 0: weechat.prnt("", "return_code = %d" % return_code) - if out != "": + if out: weechat.prnt("", "stdout: %s" % out) - if err != "": + if err: weechat.prnt("", "stderr: %s" % err) return weechat.WEECHAT_RC_OK @@ -9049,9 +9049,9 @@ def my_process_cb(data, command, return_code, out, err): return weechat.WEECHAT_RC_OK if return_code >= 0: weechat.prnt("", "return_code = %d" % return_code) - if out != "": + if out: weechat.prnt("", "stdout: %s" % out) - if err != "": + if err: weechat.prnt("", "stderr: %s" % err) return weechat.WEECHAT_RC_OK @@ -9244,9 +9244,9 @@ def my_process_cb(data, command, return_code, out, err): return weechat.WEECHAT_RC_OK if return_code >= 0: weechat.prnt("", "return_code = %d" % return_code) - if out != "": + if out: weechat.prnt("", "stdout: %s" % out) - if err != "": + if err: weechat.prnt("", "stderr: %s" % err) return weechat.WEECHAT_RC_OK @@ -12273,7 +12273,7 @@ def buffer_clear(buffer: str) -> int: ... # пример buffer = weechat.buffer_search("my_plugin", "my_buffer") -if buffer != "": +if buffer: weechat.buffer_clear(buffer) ---- |