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
Gabriel Monnerat
slapos.core
Commits
30a3eec6
Commit
30a3eec6
authored
Apr 12, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix netifaces issue, so slapformat.py can get correct ifaddresses.
parent
c2a99c9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
slapos/format.py
slapos/format.py
+1
-9
No files found.
slapos/format.py
View file @
30a3eec6
...
...
@@ -785,7 +785,7 @@ class Interface(object):
return
True
# check existence on interface for ipv6
_
,
result
=
callAndRead
([
'ip'
,
'addr'
,
'list'
,
interface_name
])
_
,
result
=
callAndRead
([
'ip'
,
'
-6'
,
'
addr'
,
'list'
,
interface_name
])
for
l
in
result
.
split
(
'
\
n
'
):
if
address
in
l
:
if
'tentative'
in
l
:
...
...
@@ -1331,14 +1331,6 @@ def tracing_monkeypatch(config):
def
main
(
*
args
):
"Run default configuration."
if
sys
.
platform
in
(
'cygwin'
,):
callAndRead
=
lambda
args
,
flag
=
True
:
args
.
insert
(
0
,
'/bin/sh'
)
\
or
real_callAndRead
(
args
,
flag
)
f
=
netifaces
.
ifaddresses
netifaces
.
ifaddresses
=
lambda
s
,
f
=
f
:
reduce
(
\
lambda
x
,
y
:[
x
.
__setitem__
(
k
,
v
+
x
.
get
(
k
,[]))
for
k
,
v
in
y
.
iteritems
()]
and
x
,
\
filter
(
None
,
[
f
(
i
)
for
i
in
netifaces
.
interfaces
()
if
i
.
startswith
(
s
)]),{})
# Parse arguments
usage
=
"usage: %s [options] CONFIGURATION_FILE"
%
sys
.
argv
[
0
]
options
,
configuration_file_path
=
Parser
(
usage
=
usage
).
check_args
(
args
)
...
...
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