From c1c9c4f88253cdd0fc959d9bfa0e39bf752beb2f Mon Sep 17 00:00:00 2001 From: "bradnelson@google.com" Date: Tue, 8 Apr 2014 20:04:40 +0000 Subject: [PATCH] Allow trychange to submit empty patch sets again. A recent change to trychange prevents empty patches from being submitted: https://codereview.chromium.org/184343003/diff/210001/trychange.py parasite (used for the gyp waterfall) relies on empty patches to share nacl trybots to build gyp at particular revisions. BUG=None TEST=local on master3 R=nodir@chromium.org Review URL: https://codereview.chromium.org/228883004 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262493 0039d316-1c4b-4281-b951-d872f2087c98 --- trychange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trychange.py b/trychange.py index f352243a9..68a84e4ee 100755 --- a/trychange.py +++ b/trychange.py @@ -500,7 +500,7 @@ def _TempFilename(name, contents=None): temp_dir = tempfile.mkdtemp(prefix=name) try: path = os.path.join(temp_dir, name) - if contents: + if contents is not None: with open(path, 'wb') as f: f.write(contents) yield path