Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
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
arduino-esp32
Commits
e2f7736c
Commit
e2f7736c
authored
Mar 04, 2018
by
Marcel Hecko
Committed by
Me No Dev
Mar 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix coding stype as per PEP8 (#1105)
parent
7aa7c3f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
tools/get.py
tools/get.py
+14
-6
No files found.
tools/get.py
100644 → 100755
View file @
e2f7736c
#!/usr/bin/env python
# This script will download and extract required tools into the current directory.
# Tools list is obtained from package/package_esp8266com_index.template.json file.
# Written by Ivan Grokhotkov, 2015.
#
"""Script to download and extract tools
This script will download and extract required tools into the current directory.
Tools list is obtained from package/package_esp8266com_index.template.json file.
"""
from
__future__
import
print_function
__author__
=
"Ivan Grokhotkov"
__version__
=
"2015"
import
os
import
shutil
import
errno
...
...
@@ -15,6 +22,7 @@ import sys
import
tarfile
import
zipfile
import
re
if
sys
.
version_info
[
0
]
==
3
:
from
urllib.request
import
urlretrieve
unicode
=
lambda
s
:
str
(
s
)
...
...
@@ -55,7 +63,7 @@ def unpack(filename, destination):
if
filename
.
endswith
(
'tar.gz'
):
tfile
=
tarfile
.
open
(
filename
,
'r:gz'
)
tfile
.
extractall
(
destination
)
dirname
=
tfile
.
getnames
()[
0
]
dirname
=
tfile
.
getnames
()[
0
]
elif
filename
.
endswith
(
'zip'
):
zfile
=
zipfile
.
ZipFile
(
filename
)
zfile
.
extractall
(
destination
)
...
...
@@ -78,7 +86,7 @@ def get_tool(tool):
url
=
tool
[
'url'
]
#real_hash = tool['checksum'].split(':')[1]
if
not
os
.
path
.
isfile
(
local_path
):
print
(
'Downloading '
+
archive_name
)
;
print
(
'Downloading '
+
archive_name
)
sys
.
stdout
.
flush
()
if
'CYGWIN_NT'
in
sys_name
:
import
ssl
...
...
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