Skip to content

Commit 517f764

Browse files
committed
fix:Compatible with different environments to run BLOCKLY paths
1 parent b64bf03 commit 517f764

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

xarm/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.14.1'
1+
__version__ = '1.14.2'

xarm/x3/xarm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import os
1010
import math
11+
import sys
1112
import time
1213
import uuid
1314
import warnings
@@ -1454,7 +1455,7 @@ def run_blockly_app(self, path, **kwargs):
14541455
try:
14551456
if not os.path.exists(path):
14561457
dir_name = 'lite6' if self.axis == 6 and self.device_type == 9 else '850' if self.axis == 6 and self.device_type == 12 else 'xarm7T' if self.axis == 7 and self.device_type == 13 else 'xarm{}'.format(self.axis)
1457-
path = os.path.join(os.path.expanduser('~'), '.UFACTORY', 'projects', 'test', dir_name, 'app', 'myapp', path) # home/uf
1458+
path = os.path.join('/home/uf' if sys.platform.startswith('linux') else os.path.expanduser('~'), '.UFACTORY', 'projects', 'test', dir_name, 'app', 'myapp', path)
14581459
if os.path.isdir(path):
14591460
path = os.path.join(path, 'app.xml')
14601461
if not os.path.exists(path):

0 commit comments

Comments
 (0)