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
Ophélie Gagnard
slapos.core
Commits
14419e35
Commit
14419e35
authored
Jun 09, 2017
by
Tomáš Peterka
Committed by
Rafael Monnerat
Jun 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[format] Small code cleanup
parent
37fc1cf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
slapos/format.py
slapos/format.py
+4
-3
No files found.
slapos/format.py
View file @
14419e35
...
@@ -611,8 +611,8 @@ class Computer(object):
...
@@ -611,8 +611,8 @@ class Computer(object):
Return:
Return:
A Computer object.
A Computer object.
"""
"""
with
open
(
path_to_xml
,
"rb"
)
as
fi
:
dumped_dict
=
xml_marshaller
.
xml_marshaller
.
loads
(
open
(
path_to_xml
).
read
()
)
dumped_dict
=
xml_marshaller
.
xml_marshaller
.
load
(
fi
)
# Reconstructing the computer object from the xml
# Reconstructing the computer object from the xml
computer
=
Computer
(
computer
=
Computer
(
...
@@ -980,7 +980,8 @@ class User(object):
...
@@ -980,7 +980,8 @@ class User(object):
user_parameter_list
.
append
(
'-r'
)
user_parameter_list
.
append
(
'-r'
)
callAndRead
([
'useradd'
]
+
user_parameter_list
)
callAndRead
([
'useradd'
]
+
user_parameter_list
)
else
:
else
:
callAndRead
([
'usermod'
]
+
user_parameter_list
)
# if the user is already created and used we should not fail
callAndRead
([
'usermod'
]
+
user_parameter_list
,
raise_on_error
=
False
)
# lock the password of user
# lock the password of user
callAndRead
([
'passwd'
,
'-l'
,
self
.
name
])
callAndRead
([
'passwd'
,
'-l'
,
self
.
name
])
...
...
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