Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos.core
Commits
11afbd15
Commit
11afbd15
authored
May 08, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grid/distribution: fix linter warnings
parent
c4902375
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
slapos/grid/distribution.py
slapos/grid/distribution.py
+6
-6
No files found.
slapos/grid/distribution.py
View file @
11afbd15
...
...
@@ -49,12 +49,12 @@ import platform
import
re
def
_debianize
(
os
):
def
_debianize
(
os
_
):
"""
keep only the major release number in case of debian, otherwise
minor releases would be seen as not compatible to each other.
"""
distname
,
version
,
id_
=
os
distname
,
version
,
id_
=
os
_
distname_lower
=
distname
.
lower
()
if
distname_lower
==
'debian'
and
'.'
in
version
:
version
=
version
.
split
(
'.'
)[
0
]
...
...
@@ -66,9 +66,9 @@ def os_matches(os1, os2):
return
_debianize
(
os1
)
==
_debianize
(
os2
)
_distributor_id_file_re
=
re
.
compile
(
"(?:DISTRIB_ID
\
s*=)
\
s*(.*)"
,
re
.
I
)
_release_file_re
=
re
.
compile
(
"(?:DISTRIB_RELEASE
\
s*=)
\
s*(.*)"
,
re
.
I
)
_codename_file_re
=
re
.
compile
(
"(?:DISTRIB_CODENAME
\
s*=)
\
s*(.*)"
,
re
.
I
)
_distributor_id_file_re
=
re
.
compile
(
r
"(?:DISTRIB_ID\
s*=)
\s*(.*)"
,
re
.
I
)
_release_file_re
=
re
.
compile
(
r
"(?:DISTRIB_RELEASE\
s*=)
\s*(.*)"
,
re
.
I
)
_codename_file_re
=
re
.
compile
(
r
"(?:DISTRIB_CODENAME\
s*=)
\s*(.*)"
,
re
.
I
)
def
patched_linux_distribution
(
distname
=
''
,
version
=
''
,
id
=
''
,
...
...
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