We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 016b073 commit e1c7b24Copy full SHA for e1c7b24
src/layout.ts
@@ -105,10 +105,12 @@ export class BlocklyLayout extends PanelLayout {
105
run(): void {
106
// Serializing our workspace into the chosen language generator.
107
let code = this._manager.generator.workspaceToCode(this._workspace);
108
- code =
109
- 'from pyniryo import *\nn = NiryoRobot("127.0.0.1")\n' +
110
- code +
111
- 'n.close_connection()';
+ if (this._manager.getToolbox() === 'niryo') {
+ code =
+ 'from pyniryo import *\nn = NiryoRobot("127.0.0.1")\n' +
+ code +
112
+ 'n.close_connection()';
113
+ }
114
this._cell.model.sharedModel.setSource(code);
115
this.addWidget(this._cell);
116
this._resizeWorkspace();
0 commit comments