Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Commit

Permalink
Improve debug a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
aquarion committed Dec 28, 2011
1 parent 835d500 commit 898609d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lampstand/reactions/play.py
Expand Up @@ -155,9 +155,12 @@ def getSteamXML(self, username):

(fileopen, fileheaders) = urllib.urlretrieve(steamurl, cachename)

print "Examining %s" % cachename

stat = os.stat(fileopen)
delta = datetime.datetime.now() - datetime.datetime.fromtimestamp(stat.st_mtime)
if delta.seconds > 60*60*12:
print " ... Redownloading, cache expired %s" % (delta.seconds / 60*60 )
os.remove(fileopen)
(fileopen, fileheaders) = urllib.urlretrieve(steamurl, cachename)

Expand Down

0 comments on commit 898609d

Please sign in to comment.