File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,14 @@ fn sys_exc_info(vm: &VirtualMachine) -> PyResult {
163163 } ) )
164164}
165165
166+ fn sys_git_info ( vm : & VirtualMachine ) -> PyObjectRef {
167+ vm. ctx . new_tuple ( vec ! [
168+ vm. ctx. new_str( "RustPython" . to_string( ) ) ,
169+ vm. ctx. new_str( version:: get_version_number( ) ) ,
170+ vm. ctx. new_str( version:: get_git_revision( ) ) ,
171+ ] )
172+ }
173+
166174// TODO: raise a SystemExit here
167175fn sys_exit ( code : OptionalArg < i32 > , _vm : & VirtualMachine ) -> PyResult < ( ) > {
168176 let code = code. unwrap_or ( 0 ) ;
@@ -360,6 +368,7 @@ settrace() -- set the global debug tracing function
360368 "settrace" => ctx. new_rustfunc( sys_settrace) ,
361369 "version" => vm. new_str( version:: get_version( ) ) ,
362370 "version_info" => version_info,
371+ "_git" => sys_git_info( vm) ,
363372 "exc_info" => ctx. new_rustfunc( sys_exc_info) ,
364373 "prefix" => ctx. new_str( prefix. to_string( ) ) ,
365374 "base_prefix" => ctx. new_str( base_prefix. to_string( ) ) ,
You can’t perform that action at this time.
0 commit comments