Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_traceback.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c
index 06d8b645ac7..911e91e9e0f 100644
--- a/source/blender/python/intern/bpy_traceback.c
+++ b/source/blender/python/intern/bpy_traceback.c
@@ -152,8 +152,7 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset)
const char *filename = _PyUnicode_AsString(filename_py);
/* python adds a '/', prefix, so check for both */
if ((BLI_path_cmp(filename, filepath) == 0) ||
- ((filename[0] == '\\' || filename[0] == '/') &&
- BLI_path_cmp(filename + 1, filepath) == 0)) {
+ (ELEM(filename[0], '\\', '/') && BLI_path_cmp(filename + 1, filepath) == 0)) {
/* good */
}
else {
@@ -177,7 +176,7 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset)
PyObject *coerce;
const char *tb_filepath = traceback_filepath(tb, &coerce);
const int match = ((BLI_path_cmp(tb_filepath, filepath) == 0) ||
- ((tb_filepath[0] == '\\' || tb_filepath[0] == '/') &&
+ (ELEM(tb_filepath[0], '\\', '/') &&
BLI_path_cmp(tb_filepath + 1, filepath) == 0));
Py_DECREF(coerce);