Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
devflow
Commits
1dd30e62
Commit
1dd30e62
authored
Jul 11, 2013
by
Christos Stavrakakis
Browse files
Remove whitespaces from getting uname
parent
842df8ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
devflow/utils.py
View file @
1dd30e62
...
@@ -230,13 +230,13 @@ def undebianize(branch):
...
@@ -230,13 +230,13 @@ def undebianize(branch):
def
get_distribution_codename
():
def
get_distribution_codename
():
codename
=
sh
.
uname
().
lower
()
codename
=
sh
.
uname
().
lower
()
.
strip
()
if
codename
==
"linux"
:
if
codename
==
"linux"
:
# lets try to be more specific using lsb_release
# lets try to be more specific using lsb_release
try
:
try
:
output
=
sh
.
lsb_release
(
"-c"
)
# pylint: disable=E1101
output
=
sh
.
lsb_release
(
"-c"
)
# pylint: disable=E1101
_
,
codename
=
output
.
split
(
"
\t
"
)
_
,
codename
=
output
.
split
(
"
\t
"
)
except
sh
.
CommandNotFound
:
except
sh
.
CommandNotFound
as
e
:
pass
pass
codename
=
codename
.
strip
()
codename
=
codename
.
strip
()
return
codename
return
codename
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