Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hiro
GetTor
Commits
1487fd8e
Commit
1487fd8e
authored
Feb 16, 2016
by
ilv
Browse files
Removed beta release from downloads
parent
206d6025
Changes
1
Hide whitespace changes
Inline
Side-by-side
gettor/http.py
View file @
1487fd8e
...
...
@@ -44,7 +44,6 @@ OS = {
RE
=
{
'os'
:
'(.*)-(\w+)'
,
'alpha'
:
'\d\.\d(\.\d)*a\d+'
,
'beta'
:
'\d\.\d(\.\d)*b\d+'
,
'stable'
:
'\d\.\d(\.\d)*'
}
...
...
@@ -214,16 +213,11 @@ class HTTP(object):
'alpha'
:
{
'latest_version'
:
''
,
'downloads'
:
{}
},
'beta'
:
{
'latest_version'
:
''
,
'downloads'
:
{}
}
}
self
.
releases
=
{
'alpha'
:
'%s/latest/alpha'
%
self
.
server
,
'beta'
:
'%s/latest/beta'
%
self
.
server
,
'stable'
:
'%s/latest/stable'
%
self
.
server
,
'updated_at'
:
strftime
(
"%Y-%m-%d %H:%M:%S"
,
gmtime
())
}
...
...
@@ -237,18 +231,12 @@ class HTTP(object):
# we'll use the latest one
lv
[
'alpha'
][
'latest_version'
]
=
v
elif
re
.
match
(
RE
[
'beta'
],
v
):
if
v
>
lv
[
'beta'
][
'latest_version'
]:
# we'll use the latest one
lv
[
'beta'
][
'latest_version'
]
=
v
elif
re
.
match
(
RE
[
'stable'
],
v
):
if
v
>
lv
[
'stable'
][
'latest_version'
]:
# we'll use the latest one
lv
[
'stable'
][
'latest_version'
]
=
v
latest_alpha
=
lv
[
'alpha'
][
'latest_version'
]
latest_beta
=
lv
[
'beta'
][
'latest_version'
]
latest_stable
=
lv
[
'stable'
][
'latest_version'
]
# another iteration to add the links
...
...
@@ -266,11 +254,6 @@ class HTTP(object):
lv
[
'alpha'
][
'downloads'
][
OS
[
osys
]]
=
{}
self
.
_add_links
(
lv
,
'alpha'
,
version
,
OS
[
osys
])
elif
latest_beta
and
version
==
latest_beta
\
and
re
.
match
(
RE
[
'beta'
],
version
):
lv
[
'beta'
][
'downloads'
][
OS
[
osys
]]
=
{}
self
.
_add_links
(
lv
,
'beta'
,
version
,
OS
[
osys
])
elif
latest_stable
and
version
==
latest_stable
\
and
re
.
match
(
RE
[
'stable'
],
version
):
lv
[
'stable'
][
'downloads'
][
OS
[
osys
]]
=
{}
...
...
Write
Preview
Supports
Markdown
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