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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
99624446
Commit
99624446
authored
Dec 11, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pylint.
parent
33480f6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
slapos/grid/utils.py
slapos/grid/utils.py
+7
-7
No files found.
slapos/grid/utils.py
View file @
99624446
...
@@ -336,13 +336,13 @@ def updateFile(file_path, content, mode='0600'):
...
@@ -336,13 +336,13 @@ def updateFile(file_path, content, mode='0600'):
"""Creates an executable with "content" as content."""
"""Creates an executable with "content" as content."""
altered
=
False
altered
=
False
if
not
(
os
.
path
.
isfile
(
file_path
))
or
\
if
not
(
os
.
path
.
isfile
(
file_path
))
or
\
not
(
hashlib
.
md5
(
open
(
file_path
).
read
()).
digest
()
==
\
not
(
hashlib
.
md5
(
open
(
file_path
).
read
()).
digest
()
==
\
hashlib
.
md5
(
content
).
digest
()):
hashlib
.
md5
(
content
).
digest
()):
altered
=
True
altered
=
True
file_file
=
open
(
file_path
,
'w'
)
file_file
=
open
(
file_path
,
'w'
)
file_file
.
write
(
content
)
file_file
.
write
(
content
)
file_file
.
flush
()
file_file
.
flush
()
file_file
.
close
()
file_file
.
close
()
os
.
chmod
(
file_path
,
stat
.
S_IREAD
|
stat
.
S_IWRITE
|
stat
.
S_IEXEC
)
os
.
chmod
(
file_path
,
stat
.
S_IREAD
|
stat
.
S_IWRITE
|
stat
.
S_IEXEC
)
if
oct
(
stat
.
S_IMODE
(
os
.
stat
(
file_path
).
st_mode
))
!=
mode
:
if
oct
(
stat
.
S_IMODE
(
os
.
stat
(
file_path
).
st_mode
))
!=
mode
:
os
.
chmod
(
file_path
,
int
(
mode
,
8
))
os
.
chmod
(
file_path
,
int
(
mode
,
8
))
...
...
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