Raise an exception for empty url schemes
This commit is contained in:
parent
eedc849c45
commit
1358f00969
1 changed files with 4 additions and 1 deletions
|
|
@ -835,7 +835,10 @@ - (BOOL)openFileURLs:(NSPasteboard*)pasteboard
|
|||
|
||||
const char *url_scheme = NULL, *bundle_id = NULL;
|
||||
if (!PyArg_ParseTuple(args, "s|z", &url_scheme, &bundle_id)) return NULL;
|
||||
if (!url_scheme || url_scheme[0] == '\0') Py_RETURN_FALSE;
|
||||
if (!url_scheme || url_scheme[0] == '\0') {
|
||||
PyErr_SetString(PyExc_TypeError, "Empty url scheme");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NSString *scheme = [NSString stringWithUTF8String:url_scheme];
|
||||
NSString *identifier = @"";
|
||||
|
|
|
|||
Loading…
Reference in a new issue