File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 55import  re 
66import  fileinput 
77
8- package_version  =  "0.5.2.dev7 " 
8+ package_version  =  "0.5.2.dev8 " 
99
1010with  open ("README.md" , "r" ) as  fh :
1111    long_description  =  fh .read ()
Original file line number Diff line number Diff line change 11import  ctypes 
2+ import  logging 
23import  traceback 
34import  signal 
45from  typing  import  Callable 
@@ -98,7 +99,16 @@ def wrapper():
9899        # the interop, there is no need to throw an exception that is impossible to handle anyway 
99100        def  keyboard_interrupt_handler (signal , frame ):
100101            pass 
101-         signal .signal (signal .SIGINT , keyboard_interrupt_handler )
102+         try :
103+             signal .signal (signal .SIGINT , keyboard_interrupt_handler )
104+         except  ValueError  as  ex :
105+             # If this exception happens, it means the signal handling is running on non-main thread. 
106+             # The end result is that keyboard or shutdown interruption will not work here or in C# interop. 
107+             # While that is not optimal, it is still better to let the application at least function 
108+             # and log the exception + warning than completely block it from functioning. 
109+             traceback .print_exc ()
110+             logging .log (logging .WARNING , "Shutdown may not work as expected. See error." )
111+ 
102112
103113        try :
104114            if  cancellation_token  is  not None :
Original file line number Diff line number Diff line change 77from  typing  import  List 
88
99version  =  "0.5.2.0" 
10- informal_version  =  "0.5.2.0-dev7 " 
11- nuget_version  =  "0.5.2.0-dev7 " 
10+ informal_version  =  "0.5.2.0-dev8 " 
11+ nuget_version  =  "0.5.2.0-dev8 " 
1212
1313
1414def  updatecsproj (projfilepath ):
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments