Blocking in shell functions. Test for exception handling. See #196.
This commit is contained in:
parent
7b29c52951
commit
790f53dd55
|
@ -2107,8 +2107,28 @@ class App(QtCore.QObject):
|
|||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
def mytest2(*args):
|
||||
to = int(args[0])
|
||||
|
||||
try:
|
||||
for rec in self.recent:
|
||||
if rec['kind'] == 'gerber':
|
||||
self.open_gerber(str(rec['filename']))
|
||||
break
|
||||
|
||||
basename = self.collection.get_names()[0]
|
||||
isolate(basename, '-passes', '10', '-combine', '1')
|
||||
iso = self.collection.get_by_name(basename + "_iso")
|
||||
|
||||
with wait_signal(self.new_object_available, to):
|
||||
1/0 # Force exception
|
||||
iso.generatecncjob()
|
||||
|
||||
return str(self.collection.get_names())
|
||||
|
||||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
def import_svg(filename, *args):
|
||||
a, kwa = h(*args)
|
||||
types = {'outname': str}
|
||||
|
@ -3215,6 +3235,10 @@ class App(QtCore.QObject):
|
|||
'fcn': mytest,
|
||||
'help': "Test function. Only for testing."
|
||||
},
|
||||
'mytest2': {
|
||||
'fcn': mytest2,
|
||||
'help': "Test function. Only for testing."
|
||||
},
|
||||
'help': {
|
||||
'fcn': shelp,
|
||||
'help': "Shows list of commands."
|
||||
|
|
Loading…
Reference in New Issue