##// END OF EJS Templates
fix jobctrl for linux (catch OSError instead of WindowsError)
Ville M. Vainio -
Show More
@@ -190,9 +190,11 b' def magic_kill(self,line):'
190
190
191 if sys.platform == 'win32':
191 if sys.platform == 'win32':
192 shell_internal_commands = 'break chcp cls copy ctty date del erase dir md mkdir path prompt rd rmdir start time type ver vol'.split()
192 shell_internal_commands = 'break chcp cls copy ctty date del erase dir md mkdir path prompt rd rmdir start time type ver vol'.split()
193 PopenExc = WindowsError
193 else:
194 else:
194 # todo linux commands
195 # todo linux commands
195 shell_internal_commands = []
196 shell_internal_commands = []
197 PopenExc = OSError
196
198
197
199
198 def jobctrl_shellcmd(ip,cmd):
200 def jobctrl_shellcmd(ip,cmd):
@@ -208,7 +210,7 b' def jobctrl_shellcmd(ip,cmd):'
208 try:
210 try:
209 try:
211 try:
210 p = Popen(cmd,shell = use_shell)
212 p = Popen(cmd,shell = use_shell)
211 except WindowsError:
213 except PopenExc :
212 if use_shell:
214 if use_shell:
213 # try with os.system
215 # try with os.system
214 os.system(cmd)
216 os.system(cmd)
General Comments 0
You need to be logged in to leave comments. Login now