Call decode() and encode() appropriately to manipulate bytes and strings.
Bug: 984182, 1009819
Change-Id: I8a73788ab912d6c6682012308954e4ab4df5fa98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1859998
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
There is no StringIO module in Python 3, it is now in the io module. Add
some code to make it work with both versions.
Bug: 1009819
Change-Id: I7be020735916f6181beaa3a2beb7e1902c38ad31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1859996
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
The module is called "Queue" in Python 2, and "queue" in Python 3. Use the
same try-ImportError check that's already present in some other files in
depot_tools to make both download_from_google_storage and
upload_to_google_storage work.
Bug: 1007872, 1009819
Change-Id: I8177cd251cbaf8313f41708036c4f36aa6d8bfe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1859994
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Ran "2to3 -w -n -f except ./".
The scripts still work with Python 2.
There are no intended behaviour changes.
Bug: 942522
Change-Id: Ifa274cb83f74cfa8ce092fffbb88f3ab5309e72c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1607841
Commit-Queue: Raul Tambre <raul@tambre.ee>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
In Python land, the method run once a test method runs is called tearDown(),
not cleanUp(). In other words, the existing methods were never called and we
were always leaving lots of "gstools_test*" directories in /tmp.
Change-Id: Ib1de95c7ba92922b98571780f389237de0dcb253
Reviewed-on: https://chromium-review.googlesource.com/753383
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
the tests haven't been ran by presumbit for a while because of the plural in
the filename.
At some point some post "gsutil cp" file checking happened, which
broke the tests. This adds a callback to the fake gsutil cp so
that the expect file is copied over.
This also removes "gsutil version" checking from gsutil.py
and just assume that if the file exists, then it's good, which
should shave about 1-2s off of each gsutil.py call.
Bug: 772740,776311
Change-Id: I4fef62cfd46a849afed1f095dd6a96069376d13d
Reviewed-on: https://chromium-review.googlesource.com/707758
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>