pinokiod 3.2.147 → 3.2.148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,20 +28,25 @@ class Python {
28
28
  })
29
29
  }
30
30
 
31
- let res = await fetch("http://127.0.0.1:42001/call", {
32
- method: "POST",
33
- headers: { "Content-Type": "application/json" },
34
- body: JSON.stringify({
35
- name: modname,
36
- path: modpath,
37
- method,
38
- params: args
31
+ try {
32
+ let res = await fetch("http://127.0.0.1:42001/call", {
33
+ method: "POST",
34
+ headers: { "Content-Type": "application/json" },
35
+ body: JSON.stringify({
36
+ name: modname,
37
+ path: modpath,
38
+ method,
39
+ params: args
40
+ })
41
+ }).then((res) => {
42
+ return res.json()
39
43
  })
40
- }).then((res) => {
41
- return res.json()
42
- })
43
- this.proc = true
44
- return res
44
+ this.proc = true
45
+ return res
46
+ } catch (e) {
47
+ console.log("FETCH ERROR", e)
48
+ this.proc = false
49
+ }
45
50
  }
46
51
  }
47
52
  module.exports = Python
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.147",
3
+ "version": "3.2.148",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {