Only show progress bar for local image files

This patch fixes a bug where both 'location' and 'progress' are passed
as command line arguments.  In this case, the 'data' field is not
present in the fields dict and therefore the progress option cannot be
used.  A check is added to make sure the user has specified both a local
image file and the progress flag together.

Change-Id: Ia563139ee8b56d54d480534986e4b619a503fbfc
Closes-Bug: #1259357
Replace file with open, which is Python 3 compatible

Change-Id: I471ae9b372f88a508d4654b1a18c6da90397a828
test_shell: remove a deprecated keyword argument

The 'version' keyword argument of argparse.ArgumentParser is deprecated. It was
set to 'None' anyway, so just remove it.

Closes-Bug: #1281856
Change-Id: I6e5af0d90e9b1e7a6a60d5183c13299101148442
Merge "Only show progress bar for local image files"
Python 3: do not use the unicode() function

It is Python2-specific, and should not be used in code intended to be portable.

Change-Id: Ibebef1a7e51a7444538275d22d444c926b8b4dec
Closes-Bug: 1284677
Merge "Replace file with open, which is Python 3 compatible"
Merge "Python 3: do not use the unicode() function"
Python3: do not use the 'file' type

It does not exist in Python 3, so we have to use a workaround.

Change-Id: Ib41b5d12102707004b354835265861710aaba568
Closes-Bug: 1287728
Merge "test_shell: remove a deprecated keyword argument"
Updated from global requirements

Change-Id: Ifb298bbb37a94e1d4f5e537b7f4eb086da4c95a9
Python 3: do not use __builtin__

Use six.moves.builtins instead, this works with both Python 2 and 3.

Change-Id: I17cdf651edbf7907e2b8b3d6aec9ace8a76b0110
Closes-Bug: 1289107
Sync with Oslo

This will help with porting to Python 3. List of merged commits:

04a1abe59ac39890f57d2eed57d3d1b12bb5d757
12bcdb71ffbe9ee1688beed1f0ddb0c198822682
2cfc1a78d8063cf20083cf7df796d730a576551c
302c7c80b503b8090e8118e45061e8903b5339a9
35dc1d797209f0b22ff3ed3b8a6059961563daee
3b248dd683d83fd564f740ea58565d1bc0bd6cc0
4246ce0f373aa8f8955a99a3b6288a32547d8e80
6650435004af149284f0badb2bb8c89005cc7dab
6d55e26aa379fd043c66d1b7c5bf59a1b4a54632
71c22e9b2fbf04fc91a7343d3de0e0c7f10e3988
84d461e859e4b1eb1a00b9b141df61c37da84d2d
8575d87af49ea276341908f83c8c51db13afca44
885828af2297b20a3f9f8e8f6647f7291f784743
8b2b0b743e84ceed7841cf470afed6a5da8e1d07
9f1e7eb4112067423f845bd99ec52256db1c8bb1
bd5dad97585208ea5e86d636f3dc3b669e361a41
be81d6ba70152e5cdd7e8e9d789b9733c6ff527f
bec3a5eb8157c0c552c6392ccf0da342ffb8da26
c178e567cb48d3bc67dcf06bcbb4c6a97df9f434

Closes-Bug: 1289690
Change-Id: I39fa5e3fa46ffe9448b381ed54759cb4270cc898
Merge "Python3: do not use the 'file' type"
Merge "Python 3: do not use __builtin__"
Merge "Sync with Oslo"