Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
0bfbae3e
Commit
0bfbae3e
authored
Jul 11, 2015
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Python 2 issue with command line unicode command.
parent
01c43cba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
ardublocklyserver/actions.py
ardublocklyserver/actions.py
+8
-0
No files found.
ardublocklyserver/actions.py
View file @
0bfbae3e
...
...
@@ -8,8 +8,10 @@
#
from
__future__
import
unicode_literals
,
absolute_import
import
subprocess
import
locale
import
time
import
json
import
sys
import
os
try
:
# 2.x name
...
...
@@ -24,6 +26,7 @@ except ImportError:
from
ardublocklyserver.compilersettings
import
ServerCompilerSettings
from
ardublocklyserver.sketchcreator
import
SketchCreator
from
ardublocklyserver.six.six.moves
import
range
import
ardublocklyserver.gui
as
gui
...
...
@@ -104,6 +107,11 @@ def load_arduino_cli(sketch_path=None):
out
=
'The sketch should be loaded in the Arduino IDE.'
cli_command
.
append
(
"%s"
%
sketch_path
)
print
(
'CLI command: %s'
%
' '
.
join
(
cli_command
))
# Python 2 needs the input to subprocess.Popen to be in system encoding
if
sys
.
version_info
[
0
]
<
3
:
for
item
in
range
(
len
(
cli_command
)):
cli_command
[
item
]
=
cli_command
[
item
].
encode
(
locale
.
getpreferredencoding
())
if
settings
.
load_ide_option
==
'open'
:
# Open IDE in a subprocess without capturing outputs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment