Print a useful message when test scripts cannot update a running dartium.

BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org//204593002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34170 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
whesse@google.com 2014-03-20 15:05:03 +00:00
parent 0244fa2a77
commit abe3e9a939

View file

@ -288,6 +288,10 @@ def GetFromGsutil(name, directory, version_file, latest_pattern,
z.close()
if directory == SDK_DIR:
unzipped_dir = os.path.join(temp_dir, 'dart-sdk')
if os.path.exists(directory):
raise Exception(
'Removal of directory %s failed. Is the executable running?' %
directory)
shutil.move(unzipped_dir, directory)
finally:
shutil.rmtree(temp_dir)