Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
4ba15e76
Commit
4ba15e76
authored
Mar 14, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slight code simplification
parent
1c56349b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
Cython/Utils.py
Cython/Utils.py
+2
-4
No files found.
Cython/Utils.py
View file @
4ba15e76
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
import
os
,
sys
,
re
,
codecs
import
os
,
sys
,
re
,
codecs
modification_time
=
os
.
path
.
getmtime
def
replace_suffix
(
path
,
newsuf
):
def
replace_suffix
(
path
,
newsuf
):
base
,
_
=
os
.
path
.
splitext
(
path
)
base
,
_
=
os
.
path
.
splitext
(
path
)
return
base
+
newsuf
return
base
+
newsuf
...
@@ -37,10 +39,6 @@ def castrate_file(path, st):
...
@@ -37,10 +39,6 @@ def castrate_file(path, st):
if
st
:
if
st
:
os
.
utime
(
path
,
(
st
.
st_atime
,
st
.
st_mtime
-
1
))
os
.
utime
(
path
,
(
st
.
st_atime
,
st
.
st_mtime
-
1
))
def
modification_time
(
path
):
st
=
os
.
stat
(
path
)
return
st
.
st_mtime
def
file_newer_than
(
path
,
time
):
def
file_newer_than
(
path
,
time
):
ftime
=
modification_time
(
path
)
ftime
=
modification_time
(
path
)
return
ftime
>
time
return
ftime
>
time
...
...
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