return cli;
}
+
+/* Return true if a dictionary contains a "level" key with an integer
+ value. Set the value if so. */
+
+BOOL get_level_value(PyObject *dict, uint32 *level)
+{
+ PyObject *obj;
+
+ if (!(obj = PyDict_GetItemString(dict, "level")) ||
+ !PyInt_Check(obj))
+ return False;
+
+ if (level)
+ *level = PyInt_AsLong(obj);
+
+ return True;
+}
PyObject *py_setup_logging(PyObject *self, PyObject *args, PyObject *kw);
struct cli_state *open_pipe_creds(char *server, PyObject *creds,
cli_pipe_fn *connect_fn, char **errstr);
+BOOL get_level_value(PyObject *dict, uint32 *level);
/* The following definitions come from python/py_ntsec.c */