Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Andrey Yemelyanov
noc
Commits
dd295784
Commit
dd295784
authored
Aug 16, 2019
by
Andrey Vertiprahov
Browse files
Merge branch 'cherry-pick-
75bc5809
' into 'release-19.3'
release-19.3:Backport!2481 See merge request
noc/noc!2483
parents
48b57445
56868af9
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/fileutils.py
View file @
dd295784
...
...
@@ -149,7 +149,7 @@ def urlopen(url, auto_deflate=False):
setup_urllib_proxies
()
if
url
.
startswith
(
"http://"
)
or
url
.
startswith
(
"https://"
):
r
=
Request
(
url
,
headers
=
{
"User-Agent"
:
"NOC/%s"
%
version
.
version
})
r
=
Request
(
url
,
headers
=
{
"User-Agent"
:
"NOC/%s"
%
version
.
version
.
strip
()
})
else
:
r
=
url
if
auto_deflate
and
url
.
endswith
(
".gz"
):
...
...
core/version.py
View file @
dd295784
...
...
@@ -76,10 +76,10 @@ class Version(object):
[
"git"
,
"describe"
,
"--tags"
,
"--abbrev=%d"
%
CHANGESET_LEN
]
)
if
"-"
not
in
v
:
return
v
return
v
.
strip
()
r
=
v
.
rsplit
(
"-"
,
2
)
if
len
(
r
)
<
3
:
return
v
return
v
.
strip
()
v
,
n
,
cs
=
r
return
"%s+%s.%s.%s"
%
(
v
,
self
.
branch
,
n
,
cs
[
1
:
CHANGESET_LEN
+
1
])
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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