Don't crash if the cookie pipe doesn't exist.

Review URL: http://chromereview.prom.corp.google.com/1187035

git-svn-id: svn://chrome-svn/chromeos/trunk@233 06c00378-0e64-4dae-be16-12b19f9950a1
This commit is contained in:
albertb@google.com 2009-11-13 19:17:31 +00:00
parent 8f72cbd775
commit 82275a3e16

View File

@ -83,7 +83,8 @@ def Authenticate(email, password):
return cookies
def WriteToPipe(pipe_path, data):
os.remove(pipe_path)
if os.path.exists(pipe_path):
os.remove(pipe_path)
os.mkfifo(pipe_path)
f = open(pipe_path, 'w')
f.write(data)