Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use the str converter
  • Loading branch information
noamcohen97 committed Jul 27, 2022
commit 29680c9dc6a0b034ef642a86d8c0ddfe0db93c68
2 changes: 1 addition & 1 deletion Lib/test/test_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_sys_getframe(self):
self.assertEqual(actual, expected)

def test_syslog(self):
syslog = import_helper.import_module("syslog")
syslog = import_helper.import_module("syslog")

returncode, events, stderr = self.run_python("test_syslog")
if returncode:
Expand Down
12 changes: 6 additions & 6 deletions Modules/clinic/syslogmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions Modules/syslogmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ syslog.syslog
priority: int(c_default="LOG_INFO") = LOG_INFO
]

message as message_object: unicode
message: str

/

Expand All @@ -186,15 +186,9 @@ Send the string message to the system logger.

static PyObject *
syslog_syslog_impl(PyObject *module, int group_left_1, int priority,
PyObject *message_object)
/*[clinic end generated code: output=3361dc7f2e863377 input=02500dddce0095df]*/
const char *message)
/*[clinic end generated code: output=c3dbc73445a0e078 input=ac83d92b12ea3d4e]*/
{
const char *message;

message = PyUnicode_AsUTF8(message_object);
if (message == NULL)
return NULL;

if (PySys_Audit("syslog.syslog", "is", priority, message) < 0) {
return NULL;
}
Expand Down