From af741ec2236619880fa902d68aef4a6ae6cef534 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Wed, 28 May 2014 11:02:12 +0200 Subject: [PATCH] Add UTF-8 coding lines to all Python files While not strictly necessary for files containing only ASCII characters, adding a line with "coding: utf-8" can guard against future SyntaxError's in case someone inserts a Unicode literal. This commit adds such lines to all .py files. The syntax used by this commit works with Python (of course). It also works with Emacs, which will recognize the special "-*-" marker and use the "coding" variable to correctly decode the file, even in an environment where UTF-8 is not the default file encoding. Existing coding lines were normalized to match the new lines added. Partial-bug: #1325193 Change-Id: I58bf93fea711fd25890356a397e594bd820c99e3 --- ironicclient/__init__.py | 2 ++ ironicclient/client.py | 2 ++ ironicclient/common/base.py | 2 ++ ironicclient/common/http.py | 2 ++ ironicclient/common/utils.py | 2 ++ ironicclient/exc.py | 2 ++ ironicclient/openstack/__init__.py | 2 ++ ironicclient/openstack/common/__init__.py | 2 ++ ironicclient/openstack/common/apiclient/auth.py | 2 ++ ironicclient/openstack/common/apiclient/base.py | 2 ++ ironicclient/openstack/common/apiclient/client.py | 2 ++ ironicclient/openstack/common/apiclient/exceptions.py | 2 ++ ironicclient/openstack/common/apiclient/fake_client.py | 2 ++ ironicclient/openstack/common/cliutils.py | 2 ++ ironicclient/openstack/common/gettextutils.py | 2 ++ ironicclient/openstack/common/importutils.py | 2 ++ ironicclient/openstack/common/strutils.py | 2 ++ ironicclient/openstack/common/uuidutils.py | 2 ++ ironicclient/shell.py | 2 ++ ironicclient/tests/test_client.py | 2 ++ ironicclient/tests/test_http.py | 2 ++ ironicclient/tests/test_shell.py | 2 ++ ironicclient/tests/test_utils.py | 2 ++ ironicclient/tests/utils.py | 2 ++ ironicclient/tests/v1/test_chassis.py | 2 +- ironicclient/tests/v1/test_chassis_shell.py | 2 +- ironicclient/tests/v1/test_driver.py | 2 +- ironicclient/tests/v1/test_driver_shell.py | 2 +- ironicclient/tests/v1/test_node.py | 2 +- ironicclient/tests/v1/test_node_shell.py | 2 +- ironicclient/tests/v1/test_port.py | 2 +- ironicclient/tests/v1/test_port_shell.py | 2 +- ironicclient/v1/__init__.py | 2 ++ ironicclient/v1/chassis.py | 2 +- ironicclient/v1/chassis_shell.py | 2 ++ ironicclient/v1/client.py | 2 ++ ironicclient/v1/driver.py | 2 +- ironicclient/v1/driver_shell.py | 2 +- ironicclient/v1/node.py | 2 +- ironicclient/v1/node_shell.py | 2 ++ ironicclient/v1/port.py | 2 +- ironicclient/v1/port_shell.py | 2 ++ ironicclient/v1/shell.py | 2 ++ setup.py | 2 ++ tools/install_venv_common.py | 2 ++ 45 files changed, 77 insertions(+), 13 deletions(-) diff --git a/ironicclient/__init__.py b/ironicclient/__init__.py index 4aa915fd8..fedf5352b 100644 --- a/ironicclient/__init__.py +++ b/ironicclient/__init__.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # diff --git a/ironicclient/client.py b/ironicclient/client.py index 544a754f1..b30b151d6 100644 --- a/ironicclient/client.py +++ b/ironicclient/client.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/ironicclient/common/base.py b/ironicclient/common/base.py index cb936d457..3e31fc606 100644 --- a/ironicclient/common/base.py +++ b/ironicclient/common/base.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2012 OpenStack LLC. # All Rights Reserved. # diff --git a/ironicclient/common/http.py b/ironicclient/common/http.py index 454316bcc..e759526cd 100644 --- a/ironicclient/common/http.py +++ b/ironicclient/common/http.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2012 OpenStack LLC. # All Rights Reserved. # diff --git a/ironicclient/common/utils.py b/ironicclient/common/utils.py index b1c82fa68..8f216de74 100644 --- a/ironicclient/common/utils.py +++ b/ironicclient/common/utils.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2012 OpenStack LLC. # All Rights Reserved. # diff --git a/ironicclient/exc.py b/ironicclient/exc.py index 4c5cfd1f3..1fc5fdd3d 100644 --- a/ironicclient/exc.py +++ b/ironicclient/exc.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/ironicclient/openstack/__init__.py b/ironicclient/openstack/__init__.py index 265c2d9f6..4dfc51bee 100644 --- a/ironicclient/openstack/__init__.py +++ b/ironicclient/openstack/__init__.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # diff --git a/ironicclient/openstack/common/__init__.py b/ironicclient/openstack/common/__init__.py index 265c2d9f6..4dfc51bee 100644 --- a/ironicclient/openstack/common/__init__.py +++ b/ironicclient/openstack/common/__init__.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # diff --git a/ironicclient/openstack/common/apiclient/auth.py b/ironicclient/openstack/common/apiclient/auth.py index 2fc43cca4..12878f9a7 100644 --- a/ironicclient/openstack/common/apiclient/auth.py +++ b/ironicclient/openstack/common/apiclient/auth.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 OpenStack Foundation # Copyright 2013 Spanish National Research Council. # All Rights Reserved. diff --git a/ironicclient/openstack/common/apiclient/base.py b/ironicclient/openstack/common/apiclient/base.py index 9da0cb693..088c60eac 100644 --- a/ironicclient/openstack/common/apiclient/base.py +++ b/ironicclient/openstack/common/apiclient/base.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # Copyright 2012 Grid Dynamics diff --git a/ironicclient/openstack/common/apiclient/client.py b/ironicclient/openstack/common/apiclient/client.py index 38672b410..d7eee7d77 100644 --- a/ironicclient/openstack/common/apiclient/client.py +++ b/ironicclient/openstack/common/apiclient/client.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, Inc. diff --git a/ironicclient/openstack/common/apiclient/exceptions.py b/ironicclient/openstack/common/apiclient/exceptions.py index ada1344f5..3d76835b1 100644 --- a/ironicclient/openstack/common/apiclient/exceptions.py +++ b/ironicclient/openstack/common/apiclient/exceptions.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 Nebula, Inc. # Copyright 2013 Alessio Ababilov diff --git a/ironicclient/openstack/common/apiclient/fake_client.py b/ironicclient/openstack/common/apiclient/fake_client.py index 45a6df4a4..4c41e702c 100644 --- a/ironicclient/openstack/common/apiclient/fake_client.py +++ b/ironicclient/openstack/common/apiclient/fake_client.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 OpenStack Foundation # All Rights Reserved. # diff --git a/ironicclient/openstack/common/cliutils.py b/ironicclient/openstack/common/cliutils.py index ac23cbf2b..c7c4f0a82 100644 --- a/ironicclient/openstack/common/cliutils.py +++ b/ironicclient/openstack/common/cliutils.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/ironicclient/openstack/common/gettextutils.py b/ironicclient/openstack/common/gettextutils.py index 9919d42d8..b1798ee04 100644 --- a/ironicclient/openstack/common/gettextutils.py +++ b/ironicclient/openstack/common/gettextutils.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2012 Red Hat, Inc. # Copyright 2013 IBM Corp. # All Rights Reserved. diff --git a/ironicclient/openstack/common/importutils.py b/ironicclient/openstack/common/importutils.py index 8f9d5eeb8..e6bf556b8 100644 --- a/ironicclient/openstack/common/importutils.py +++ b/ironicclient/openstack/common/importutils.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2011 OpenStack Foundation. # All Rights Reserved. # diff --git a/ironicclient/openstack/common/strutils.py b/ironicclient/openstack/common/strutils.py index 218402dcb..c2870d38e 100644 --- a/ironicclient/openstack/common/strutils.py +++ b/ironicclient/openstack/common/strutils.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2011 OpenStack Foundation. # All Rights Reserved. # diff --git a/ironicclient/openstack/common/uuidutils.py b/ironicclient/openstack/common/uuidutils.py index 234b880c9..49c201aeb 100644 --- a/ironicclient/openstack/common/uuidutils.py +++ b/ironicclient/openstack/common/uuidutils.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright (c) 2012 Intel Corporation. # All Rights Reserved. # diff --git a/ironicclient/shell.py b/ironicclient/shell.py index de4573338..31f2ddecb 100644 --- a/ironicclient/shell.py +++ b/ironicclient/shell.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/ironicclient/tests/test_client.py b/ironicclient/tests/test_client.py index ae1b0256a..7d3240a1d 100644 --- a/ironicclient/tests/test_client.py +++ b/ironicclient/tests/test_client.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/ironicclient/tests/test_http.py b/ironicclient/tests/test_http.py index d7e82d548..e853eaf32 100644 --- a/ironicclient/tests/test_http.py +++ b/ironicclient/tests/test_http.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2012 OpenStack LLC. # All Rights Reserved. # diff --git a/ironicclient/tests/test_shell.py b/ironicclient/tests/test_shell.py index 80881e9f8..7bc8a1d5f 100644 --- a/ironicclient/tests/test_shell.py +++ b/ironicclient/tests/test_shell.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/ironicclient/tests/test_utils.py b/ironicclient/tests/test_utils.py index 069abbe36..f6253044c 100644 --- a/ironicclient/tests/test_utils.py +++ b/ironicclient/tests/test_utils.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 OpenStack LLC. # All Rights Reserved. # diff --git a/ironicclient/tests/utils.py b/ironicclient/tests/utils.py index 8ee3cf0a4..62d21e7f2 100644 --- a/ironicclient/tests/utils.py +++ b/ironicclient/tests/utils.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2012 OpenStack LLC. # All Rights Reserved. # diff --git a/ironicclient/tests/v1/test_chassis.py b/ironicclient/tests/v1/test_chassis.py index ffe99683a..af0a15151 100644 --- a/ironicclient/tests/v1/test_chassis.py +++ b/ironicclient/tests/v1/test_chassis.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # Copyright 2013 Red Hat, Inc. # All Rights Reserved. diff --git a/ironicclient/tests/v1/test_chassis_shell.py b/ironicclient/tests/v1/test_chassis_shell.py index 93f08de14..ef54f98d0 100644 --- a/ironicclient/tests/v1/test_chassis_shell.py +++ b/ironicclient/tests/v1/test_chassis_shell.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # # Copyright 2013 IBM Corp # diff --git a/ironicclient/tests/v1/test_driver.py b/ironicclient/tests/v1/test_driver.py index 891f244e8..162c25e9e 100644 --- a/ironicclient/tests/v1/test_driver.py +++ b/ironicclient/tests/v1/test_driver.py @@ -1,4 +1,4 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- # # Copyright 2013 Red Hat, Inc. # All Rights Reserved. diff --git a/ironicclient/tests/v1/test_driver_shell.py b/ironicclient/tests/v1/test_driver_shell.py index 16676383a..84d6badc7 100644 --- a/ironicclient/tests/v1/test_driver_shell.py +++ b/ironicclient/tests/v1/test_driver_shell.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # # Copyright 2014 Hewlett-Packard Development Company, L.P. # diff --git a/ironicclient/tests/v1/test_node.py b/ironicclient/tests/v1/test_node.py index a25215d37..ed07fb920 100644 --- a/ironicclient/tests/v1/test_node.py +++ b/ironicclient/tests/v1/test_node.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # diff --git a/ironicclient/tests/v1/test_node_shell.py b/ironicclient/tests/v1/test_node_shell.py index ac66e2f91..68c111b12 100644 --- a/ironicclient/tests/v1/test_node_shell.py +++ b/ironicclient/tests/v1/test_node_shell.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # # Copyright 2013 IBM Corp # diff --git a/ironicclient/tests/v1/test_port.py b/ironicclient/tests/v1/test_port.py index 599665db0..e4848ce0a 100644 --- a/ironicclient/tests/v1/test_port.py +++ b/ironicclient/tests/v1/test_port.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # Copyright 2013 Red Hat, Inc. # All Rights Reserved. diff --git a/ironicclient/tests/v1/test_port_shell.py b/ironicclient/tests/v1/test_port_shell.py index 925b24624..2129d27a4 100644 --- a/ironicclient/tests/v1/test_port_shell.py +++ b/ironicclient/tests/v1/test_port_shell.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # # Copyright 2013 IBM Corp # diff --git a/ironicclient/v1/__init__.py b/ironicclient/v1/__init__.py index 80068acba..2f9d7e266 100644 --- a/ironicclient/v1/__init__.py +++ b/ironicclient/v1/__init__.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 Red Hat, Inc. # All Rights Reserved. # diff --git a/ironicclient/v1/chassis.py b/ironicclient/v1/chassis.py index c592ba5d0..fece0b4da 100644 --- a/ironicclient/v1/chassis.py +++ b/ironicclient/v1/chassis.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # # Copyright © 2013 Red Hat, Inc # diff --git a/ironicclient/v1/chassis_shell.py b/ironicclient/v1/chassis_shell.py index 533206f0b..510f7faf6 100644 --- a/ironicclient/v1/chassis_shell.py +++ b/ironicclient/v1/chassis_shell.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 Red Hat, Inc. # All Rights Reserved. # diff --git a/ironicclient/v1/client.py b/ironicclient/v1/client.py index 6e5277050..d4b5ceedb 100644 --- a/ironicclient/v1/client.py +++ b/ironicclient/v1/client.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2012 OpenStack LLC. # All Rights Reserved. # diff --git a/ironicclient/v1/driver.py b/ironicclient/v1/driver.py index 2f9529c1b..e3a6c896b 100644 --- a/ironicclient/v1/driver.py +++ b/ironicclient/v1/driver.py @@ -1,4 +1,4 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- # # Copyright 2013 Red Hat, Inc. # All Rights Reserved. diff --git a/ironicclient/v1/driver_shell.py b/ironicclient/v1/driver_shell.py index bbb4c0153..e83470ab0 100644 --- a/ironicclient/v1/driver_shell.py +++ b/ironicclient/v1/driver_shell.py @@ -1,4 +1,4 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- # # Copyright 2013 Red Hat, Inc. # All Rights Reserved. diff --git a/ironicclient/v1/node.py b/ironicclient/v1/node.py index ede506f74..50822185d 100644 --- a/ironicclient/v1/node.py +++ b/ironicclient/v1/node.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # diff --git a/ironicclient/v1/node_shell.py b/ironicclient/v1/node_shell.py index 6e4065758..7725b4842 100644 --- a/ironicclient/v1/node_shell.py +++ b/ironicclient/v1/node_shell.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 Red Hat, Inc. # All Rights Reserved. # diff --git a/ironicclient/v1/port.py b/ironicclient/v1/port.py index cdd92af82..a85b76523 100644 --- a/ironicclient/v1/port.py +++ b/ironicclient/v1/port.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # # Copyright © 2013 Red Hat, Inc # diff --git a/ironicclient/v1/port_shell.py b/ironicclient/v1/port_shell.py index 77828e627..d0cf365b5 100644 --- a/ironicclient/v1/port_shell.py +++ b/ironicclient/v1/port_shell.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 Red Hat, Inc. # All Rights Reserved. # diff --git a/ironicclient/v1/shell.py b/ironicclient/v1/shell.py index 890793cbc..0fe526f92 100644 --- a/ironicclient/v1/shell.py +++ b/ironicclient/v1/shell.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/setup.py b/setup.py index 736375744..4a00f9b04 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,6 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- +# # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index 8f54ce6d9..69a5fc984 100644 --- a/tools/install_venv_common.py +++ b/tools/install_venv_common.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # Copyright 2013 OpenStack Foundation # Copyright 2013 IBM Corp. #