Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
Lisa Casino
slapos.package
Commits
65e422e2
Commit
65e422e2
authored
Mar 07, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix way of getting computer_id
parent
79cf7086
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
slapprepare/slapprepare/slapprepare.py
slapprepare/slapprepare/slapprepare.py
+3
-8
No files found.
slapprepare/slapprepare/slapprepare.py
View file @
65e422e2
...
...
@@ -151,14 +151,9 @@ def suse_version():
# Parse certificate to get computer name and return it
def
get_computer_name
(
slapos_configuration
):
try
:
conf_file
=
open
(
slapos_configuration
,
"r"
)
for
line
in
conf_file
:
line
=
line
.
rstrip
(
'
\
n
'
)
if
"computer_id"
in
line
:
i
=
line
.
find
(
"COMP-"
)
conf_file
.
close
()
return
line
[
i
:]
except
IOError
:
return
getSlaposConfiguration
(
slapos_configuration
).
get
(
'slapos'
,
'computer_id'
)
except
:
print
"Warning: slapos.cfg doesn't exist. Using current hostname."
return
socket
.
gethostname
()
...
...
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