This commit is contained in:
Miroslav Stampar 2015-11-23 09:24:30 +01:00
parent b2dc443835
commit bdb496eaa5

View File

@ -11,6 +11,7 @@ import shutil
import stat import stat
import string import string
from lib.core.common import getSafeExString
from lib.core.data import logger from lib.core.data import logger
def purge(directory): def purge(directory):
@ -79,4 +80,4 @@ def purge(directory):
try: try:
shutil.rmtree(directory) shutil.rmtree(directory)
except OSError, ex: except OSError, ex:
logger.error("problem occurred while removing directory '%s' ('%s')" % (directory, unicode(ex))) logger.error("problem occurred while removing directory '%s' ('%s')" % (directory, getSafeExString(ex)))