##// END OF EJS Templates
rust-status: properly translate OSError to Python...
Raphaël Gomès -
r46465:c9c3c277 default
parent child Browse files
Show More
@@ -10,6 +10,7 b''
10 10 //! `rustext.dirstate.status`.
11 11
12 12 use crate::{dirstate::DirstateMap, exceptions::FallbackError};
13 use cpython::exc::OSError;
13 14 use cpython::{
14 15 exc::ValueError, ObjectProtocol, PyBytes, PyErr, PyList, PyObject,
15 16 PyResult, PyTuple, Python, PythonObject, ToPyObject,
@@ -89,6 +90,7 b' fn handle_fallback(py: Python, err: Stat'
89 90
90 91 PyErr::new::<FallbackError, _>(py, &as_string)
91 92 }
93 StatusError::IO(e) => PyErr::new::<OSError, _>(py, e.to_string()),
92 94 e => PyErr::new::<ValueError, _>(py, e.to_string()),
93 95 }
94 96 }
General Comments 0
You need to be logged in to leave comments. Login now