Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
2edd7a88
Commit
2edd7a88
authored
Dec 03, 2013
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python3: Fix PEP8 and avoid crash when listing
Signed-off-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
c5d32181
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
api_test.py
src/python-lxc/examples/api_test.py
+2
-1
pyconsole-vte.py
src/python-lxc/examples/pyconsole-vte.py
+2
-1
pyconsole.py
src/python-lxc/examples/pyconsole.py
+2
-1
__init__.py
src/python-lxc/lxc/__init__.py
+6
-2
No files found.
src/python-lxc/examples/api_test.py
View file @
2edd7a88
...
...
@@ -19,7 +19,8 @@
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
#
import
warnings
...
...
src/python-lxc/examples/pyconsole-vte.py
View file @
2edd7a88
...
...
@@ -20,7 +20,8 @@
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
#
import
warnings
...
...
src/python-lxc/examples/pyconsole.py
View file @
2edd7a88
...
...
@@ -20,7 +20,8 @@
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
#
import
warnings
...
...
src/python-lxc/lxc/__init__.py
View file @
2edd7a88
...
...
@@ -18,7 +18,8 @@
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
#
import
_lxc
...
...
@@ -346,7 +347,6 @@ class Container(_lxc.Container):
return
_lxc
.
Container
.
get_interfaces
(
self
)
def
get_ips
(
self
,
interface
=
None
,
family
=
None
,
scope
=
None
,
timeout
=
0
):
"""
Get a tuple of IPs for the container.
...
...
@@ -430,6 +430,8 @@ def list_containers(active=True, defined=True,
"""
if
config_path
:
if
not
os
.
path
.
exists
(
config_path
):
return
tuple
()
entries
=
_lxc
.
list_containers
(
active
=
active
,
defined
=
defined
,
config_path
=
config_path
)
else
:
...
...
@@ -456,6 +458,7 @@ def attach_run_command(cmd):
else
:
return
_lxc
.
attach_run_command
((
cmd
,
[
cmd
]))
def
attach_run_shell
():
"""
Run a shell when attaching
...
...
@@ -466,6 +469,7 @@ def attach_run_shell():
"""
return
_lxc
.
attach_run_shell
(
None
)
def
arch_to_personality
(
arch
):
"""
Determine the process personality corresponding to the architecture
...
...
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