aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/copyright_header.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/devtools/copyright_header.py')
-rwxr-xr-xcontrib/devtools/copyright_header.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/devtools/copyright_header.py b/contrib/devtools/copyright_header.py
index c817e794b9..82d3c19683 100755
--- a/contrib/devtools/copyright_header.py
+++ b/contrib/devtools/copyright_header.py
@@ -286,7 +286,7 @@ Arguments:
def report_cmd(argv):
if len(argv) == 2:
sys.exit(REPORT_USAGE)
-
+
base_directory = argv[2]
if not os.path.exists(base_directory):
sys.exit("*** bad <base_directory>: %s" % base_directory)
@@ -444,7 +444,7 @@ def print_file_action_message(filename, action):
def update_cmd(argv):
if len(argv) != 3:
sys.exit(UPDATE_USAGE)
-
+
base_directory = argv[2]
if not os.path.exists(base_directory):
sys.exit("*** bad base_directory: %s" % base_directory)
@@ -506,7 +506,7 @@ def file_has_hashbang(file_lines):
def insert_python_header(filename, file_lines, start_year, end_year):
if file_has_hashbang(file_lines):
- insert_idx = 1
+ insert_idx = 1
else:
insert_idx = 0
header_lines = get_python_header_lines_to_insert(start_year, end_year)
@@ -570,13 +570,13 @@ def insert_cmd(argv):
_, extension = os.path.splitext(filename)
if extension not in ['.h', '.cpp', '.cc', '.c', '.py']:
sys.exit("*** cannot insert for file extension %s" % extension)
-
- if extension == '.py':
+
+ if extension == '.py':
style = 'python'
else:
style = 'cpp'
exec_insert_header(filename, style)
-
+
################################################################################
# UI
################################################################################