Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
instrumentation tests: Stop passing a generator to posixpath.join()
Browse files Browse the repository at this point in the history
> Commit d4d66d4 ("Reland #2: Move side-loaded test data /sdcard ->
> /sdcard/gtestdata") introduced a regression in
> LocalDeviceInstrumentationTestRun.substitute_device_root() when it's
> passed a list: the posixpath.join() call ends up receiving a generator
> instead of multiple arguments.
>
> This means the call will return a generator instead of 'foo/bar/baz',
> which is not what's intended.
>
> [email protected]
> Review-Url: https://codereview.chromium.org/2360693002
  • Loading branch information
rakuco committed Oct 11, 2016
1 parent 6f48440 commit 64345ff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def substitute_device_root(d, device_root):
if not d:
return device_root
elif isinstance(d, list):
return posixpath.join(p if p else device_root for p in d)
return posixpath.join(*(p if p else device_root for p in d))
else:
return d

Expand Down

0 comments on commit 64345ff

Please sign in to comment.