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 4aa915f..fedf535 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 544a754..b30b151 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 cb936d4..3e31fc6 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 454316b..e759526 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 b1c82fa..8f216de 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 4c5cfd1..1fc5fdd 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 265c2d9..4dfc51b 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 265c2d9..4dfc51b 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 2fc43cc..12878f9 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 9da0cb6..088c60e 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 38672b4..d7eee7d 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 ada1344..3d76835 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 45a6df4..4c41e70 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 ac23cbf..c7c4f0a 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 9919d42..b1798ee 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 8f9d5ee..e6bf556 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 218402d..c2870d3 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 234b880..49c201a 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 de45733..31f2dde 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 ae1b025..7d3240a 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 d7e82d5..e853eaf 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 80881e9..7bc8a1d 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 069abbe..f625304 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 8ee3cf0..62d21e7 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 ffe9968..af0a151 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 93f08de..ef54f98 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 891f244..162c25e 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 1667638..84d6bad 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 a25215d..ed07fb9 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 ac66e2f..68c111b 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 599665d..e4848ce 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 925b246..2129d27 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 80068ac..2f9d7e2 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 c592ba5..fece0b4 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 533206f..510f7fa 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 6e52770..d4b5cee 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 2f9529c..e3a6c89 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 bbb4c01..e83470a 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 ede506f..5082218 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 6e40657..7725b48 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 cdd92af..a85b765 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 77828e6..d0cf365 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 890793c..0fe526f 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 7363757..4a00f9b 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 8f54ce6..69a5fc9 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. #