Blocking in shell functions. Test for exception handling. See #196.
This commit is contained in:
parent
7b29c52951
commit
790f53dd55
|
@ -2107,7 +2107,27 @@ class App(QtCore.QObject):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return str(e)
|
return str(e)
|
||||||
|
|
||||||
return str(self.collection.get_names())
|
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):
|
def import_svg(filename, *args):
|
||||||
a, kwa = h(*args)
|
a, kwa = h(*args)
|
||||||
|
@ -3215,6 +3235,10 @@ class App(QtCore.QObject):
|
||||||
'fcn': mytest,
|
'fcn': mytest,
|
||||||
'help': "Test function. Only for testing."
|
'help': "Test function. Only for testing."
|
||||||
},
|
},
|
||||||
|
'mytest2': {
|
||||||
|
'fcn': mytest2,
|
||||||
|
'help': "Test function. Only for testing."
|
||||||
|
},
|
||||||
'help': {
|
'help': {
|
||||||
'fcn': shelp,
|
'fcn': shelp,
|
||||||
'help': "Shows list of commands."
|
'help': "Shows list of commands."
|
||||||
|
|
Loading…
Reference in New Issue