Commit 1dcd905b by Michael DeHaan

Backport fix around backstop to prevent deletion of tempdirs (tolerate unicode returns)

parent e63f401e
...@@ -145,11 +145,11 @@ class Runner(object): ...@@ -145,11 +145,11 @@ class Runner(object):
# ability to turn off temp file deletion for debug purposes # ability to turn off temp file deletion for debug purposes
return return
if type(files) == str: if type(files) in [ str, unicode ]:
files = [ files ] files = [ files ]
for filename in files: for filename in files:
if filename.find('/tmp/') == -1: if filename.find('/tmp/') == -1:
raise Exception("not going to happen") raise Exception("trying to delete unexpected tempdir, not going to happen")
self._low_level_exec_command(conn, "rm -rf %s" % filename, None) self._low_level_exec_command(conn, "rm -rf %s" % filename, None)
# ***************************************************** # *****************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment