Your ROOT_URL in app.ini is https://git.hpc.odu.edu/ but you are visiting https://git.wahab.hpc.odu.edu/wirawan0/wpylib/commit/b7f1cbaa5ca5c1d02b7af518b9336ea385e1425d?style=unified&whitespace=ignore-change You should set ROOT_URL correctly, otherwise the web may not work correctly.

* In tmpdir cleanup: Replaced stray debug printout with a warning msg if

tmpdir is not to be cleaned up.
master
Wirawan Purwanto 11 years ago
parent 7568f5874e
commit b7f1cbaa5c
  1. 13
      file/tmpdir.py

@ -29,6 +29,7 @@ But this must be added before the first tmpdir() function call.
import os
import os.path
import sys
import tempfile
from warnings import warn
@ -65,12 +66,20 @@ def tmpdir():
def tmpdir_exitfunc():
global TMPDIR
global TMPDIR_CLEANUP
print "TMPDIR_CLEANUP = ", TMPDIR_CLEANUP
if TMPDIR != None and os.path.isdir(TMPDIR) and TMPDIR_CLEANUP:
#print "TMPDIR_CLEANUP = ", TMPDIR_CLEANUP
if TMPDIR != None and os.path.isdir(TMPDIR):
if TMPDIR_CLEANUP:
try:
sh.rm("-rf", TMPDIR)
except:
try:
sh.ls("-al", TMPDIR)
except:
pass
warn("Failed to remove temporary directory %s" % TMPDIR)
else:
pass
sys.stderr.write("wpylib.file.tmpdir: temp dir not cleaned up: %s\n" % TMPDIR)
atexit.register(tmpdir_exitfunc)
return TMPDIR

Loading…
Cancel
Save