Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
4e531f64
Commit
4e531f64
authored
Feb 18, 2017
by
Michael Goderbauer
Committed by
GitHub
Feb 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make download_android_tools fail when the download fails (#8261)
parent
e0b12ca1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
download_android_tools.py
dev/bots/download_android_tools.py
+10
-6
No files found.
dev/bots/download_android_tools.py
View file @
4e531f64
...
...
@@ -62,7 +62,7 @@ def UpdateTools(tools_name):
version
=
f
.
read
()
.
strip
()
# Return if installed binaries are up to date.
if
version
==
GetInstalledVersion
(
version_stamp
):
return
return
True
# Remove the old install directory checked out from git.
if
os
.
path
.
exists
(
os
.
path
.
join
(
INSTALL_DIR
,
'.git'
)):
...
...
@@ -82,7 +82,7 @@ def UpdateTools(tools_name):
archive_path
]
if
not
RunCommand
(
download_cmd
):
print
(
'WARNING: Failed to download Android tools.'
)
return
return
False
print
"Extracting Android tools ("
+
tools_name
+
")"
with
tarfile
.
open
(
archive_path
)
as
arch
:
...
...
@@ -91,6 +91,7 @@ def UpdateTools(tools_name):
# Write version as the last step.
with
open
(
os
.
path
.
join
(
INSTALL_DIR
,
version_stamp
),
'w+'
)
as
f
:
f
.
write
(
'
%
s
\n
'
%
version
)
return
True
def
main
(
argv
):
option_parser
=
optparse
.
OptionParser
()
...
...
@@ -110,10 +111,13 @@ def main(argv):
option_parser
.
print_help
()
sys
.
exit
(
1
)
if
options
.
type
in
(
'sdk'
,
'both'
):
UpdateTools
(
'sdk'
)
if
options
.
type
in
(
'ndk'
,
'both'
):
UpdateTools
(
'ndk'
)
if
options
.
type
in
(
'sdk'
,
'both'
)
and
not
UpdateTools
(
'sdk'
):
print
(
'ERROR: Failed to download sdk.'
)
sys
.
exit
(
1
)
if
options
.
type
in
(
'ndk'
,
'both'
)
and
not
UpdateTools
(
'ndk'
):
print
(
'ERROR: Failed to download ndk.'
)
sys
.
exit
(
1
)
if
__name__
==
'__main__'
:
sys
.
exit
(
main
(
sys
.
argv
))
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