libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [libcloud] 04/12: Don't include trailing whitespace.
Date Thu, 14 Nov 2019 13:21:21 GMT
This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit 72392a871cdf028f7eb2efe3fe98d1152561394f
Author: Tomaz Muraus <tomaz@tomaz.me>
AuthorDate: Wed Nov 13 23:45:37 2019 +0100

    Don't include trailing whitespace.
---
 contrib/scrape-ec2-sizes.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/contrib/scrape-ec2-sizes.py b/contrib/scrape-ec2-sizes.py
index 7d43258..4f4d2ea 100755
--- a/contrib/scrape-ec2-sizes.py
+++ b/contrib/scrape-ec2-sizes.py
@@ -16,6 +16,7 @@
 #  KIND, either express or implied.  See the License for the
 #  specific language governing permissions and limitations
 #  under the License.
+
 """
 This script downloads and parses AWS EC2 from https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json.
 It writes a Python module with constants about EC2's sizes and regions.
@@ -296,8 +297,12 @@ def dump():
     print("# See the License for the specific language governing permissions and")
     print("# limitations under the License.")
 
-    print("INSTANCE_TYPES = " + json.dumps(sizes, indent=4, sort_keys=True).replace('null',
'None'))
-    print("REGION_DETAILS = " + json.dumps(regions, indent=4, sort_keys=True))
+    separators = (',', ': ')
+
+    print("INSTANCE_TYPES = " + json.dumps(sizes, indent=4, sort_keys=True,
+                                           separators=separators)).replace('null', 'None')
+    print("REGION_DETAILS = " + json.dumps(regions, indent=4, sort_keys=True,
+                                           separators=separators))
 
 
 if __name__ == '__main__':


Mime
View raw message