Commit 4ba15e76 authored by Stefan Behnel's avatar Stefan Behnel

slight code simplification

parent 1c56349b
......@@ -5,6 +5,8 @@
import os, sys, re, codecs
modification_time = os.path.getmtime
def replace_suffix(path, newsuf):
base, _ = os.path.splitext(path)
return base + newsuf
......@@ -37,10 +39,6 @@ def castrate_file(path, st):
if st:
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):
ftime = modification_time(path)
return ftime > time
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment