Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/pactest/util.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-02-07 20:16:16 -0600
committerDan McGee <dan@archlinux.org>2008-02-07 20:16:16 -0600
commitbfc024eab3a1d26ba37620175be815cb2eb59606 (patch)
tree96c1c3d89b0e523364b6b000ef02105ebbd0923e /pactest/util.py
parent77c3cf9790472592902183354ea5481cffc01f58 (diff)
parent14ee1be1ef21e09a84f01dc9623e8513218709d4 (diff)
Merge branch 'maint'
Diffstat (limited to 'pactest/util.py')
-rwxr-xr-xpactest/util.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pactest/util.py b/pactest/util.py
index b24bfdcf..2a6ff4e7 100755
--- a/pactest/util.py
+++ b/pactest/util.py
@@ -196,6 +196,9 @@ def mkcfgfile(filename, root, option, db):
def getmd5sum(filename):
"""
"""
+ if not os.path.isfile(filename):
+ print "file %s does not exist!" % filename
+ return ""
fd = open(filename, "rb")
checksum = md5.new()
while 1:
@@ -223,6 +226,9 @@ def mkmd5sum(data):
def getmtime(filename):
"""
"""
+ if not os.path.exists(filename):
+ print "path %s does not exist!" % filename
+ return 0, 0, 0
st = os.stat(filename)
return st[stat.ST_ATIME], st[stat.ST_MTIME], st[stat.ST_CTIME]