fixed bug in tickets2emails, thanks Niphlod

This commit is contained in:
mdipierro
2012-09-01 22:33:46 -05:00
parent 0f94ac864b
commit 9a89a9beac
3 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ update:
wget -O gluon/contrib/simplejsonrpc.py http://rad2py.googlecode.com/hg/ide2py/simplejsonrpc.py
echo "remember that pymysql was tweaked"
src:
echo 'Version 2.0.5 ('`date +%Y-%m-%d\ %H:%M:%S`') stable' > VERSION
echo 'Version 2.0.6 ('`date +%Y-%m-%d\ %H:%M:%S`') stable' > VERSION
### rm -f all junk files
make clean
### clean up baisc apps
+1 -1
View File
@@ -1 +1 @@
Version 2.0.5 (2012-09-01 22:32:08) stable
Version 2.0.6 (2012-09-01 22:33:43) stable
+3 -5
View File
@@ -26,10 +26,8 @@ administrator_email = 'you@localhost'
while 1:
for file in os.listdir(path):
filename = os.path.join(path, file)
if not ALLOW_DUPLICATES:
fileobj = open(filename, 'r')
fileobj = open(file, 'r')
try:
file_data = fileobj.read()
finally:
@@ -42,10 +40,10 @@ while 1:
hashes[key] = 1
error = RestrictedError()
error.load(request, request.application, filename)
error.load(request, request.application, file)
mail.send(to=administrator_email, subject='new web2py ticket', message=error.traceback)
os.unlink(filename)
os.unlink(os.path.join(path, file))
time.sleep(SLEEP_MINUTES * 60)