diff --git a/scripts/fixup_headers.py b/scripts/fixup_headers.py index 31dfd578..3a885932 100755 --- a/scripts/fixup_headers.py +++ b/scripts/fixup_headers.py @@ -5,7 +5,7 @@ # first to make sure there is a clean dry run of the files that should # be updated -import os, string +import os from optparse import OptionParser global_ignores = ['contrib', '.svn'] @@ -37,8 +37,6 @@ def fixupHeader(): if ignore in dirnames: dirnames.remove(ignore) - #print dirpath - #print dirnames for file in filenames: suffix = os.path.splitext(file) if suffix[-1] == '.C' or suffix[-1] == '.h': @@ -51,12 +49,12 @@ def checkAndUpdate(filename): f.close() # Check (exact match only) - if (string.find(text, copyright_header) == -1): + if copyright_header not in text: # print the first 10 lines or so of the file if global_options.update == False: # Report only - print filename + ' does not contain an up to date header' + print(filename + ' does not contain an up to date header') if global_options.verbose == True: - print '>'*40, '\n', '\n'.join((text.split('\n', 10))[:10]), '\n'*5 + print('>'*40, '\n', '\n'.join((text.split('\n', 10))[:10]), '\n'*5) else: # Update f = open(filename + '~tmp', 'w') @@ -71,5 +69,3 @@ def checkAndUpdate(filename): parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False) (global_options, args) = parser.parse_args() fixupHeader() - - diff --git a/src/main.C b/src/main.C index c83b5808..24bc40bf 100644 --- a/src/main.C +++ b/src/main.C @@ -1,3 +1,17 @@ +/****************************************************************/ +/* DO NOT MODIFY OR REMOVE THIS HEADER */ +/* FALCON - Fracturing And Liquid CONvection */ +/* */ +/* (c) 2012 Battelle Energy Alliance, LLC */ +/* ALL RIGHTS RESERVED */ +/* */ +/* Prepared by Battelle Energy Alliance, LLC */ +/* Under Contract No. DE-AC07-05ID14517 */ +/* With the U. S. Department of Energy */ +/* */ +/* See COPYRIGHT for full restrictions */ +/****************************************************************/ + /****************************************************************/ /* DO NOT MODIFY OR REMOVE THIS HEADER */ /* FALCON - Fracturing And Liquid CONvection */ diff --git a/test/include/base/FalconTestApp.h b/test/include/base/FalconTestApp.h index 1c5bdfdf..df680f0d 100644 --- a/test/include/base/FalconTestApp.h +++ b/test/include/base/FalconTestApp.h @@ -1,3 +1,17 @@ +/****************************************************************/ +/* DO NOT MODIFY OR REMOVE THIS HEADER */ +/* FALCON - Fracturing And Liquid CONvection */ +/* */ +/* (c) 2012 Battelle Energy Alliance, LLC */ +/* ALL RIGHTS RESERVED */ +/* */ +/* Prepared by Battelle Energy Alliance, LLC */ +/* Under Contract No. DE-AC07-05ID14517 */ +/* With the U. S. Department of Energy */ +/* */ +/* See COPYRIGHT for full restrictions */ +/****************************************************************/ + /****************************************************************/ /* DO NOT MODIFY OR REMOVE THIS HEADER */ /* FALCON - Fracturing And Liquid CONvection */ diff --git a/test/src/base/FalconTestApp.C b/test/src/base/FalconTestApp.C index 381e498e..70d62e02 100644 --- a/test/src/base/FalconTestApp.C +++ b/test/src/base/FalconTestApp.C @@ -1,3 +1,17 @@ +/****************************************************************/ +/* DO NOT MODIFY OR REMOVE THIS HEADER */ +/* FALCON - Fracturing And Liquid CONvection */ +/* */ +/* (c) 2012 Battelle Energy Alliance, LLC */ +/* ALL RIGHTS RESERVED */ +/* */ +/* Prepared by Battelle Energy Alliance, LLC */ +/* Under Contract No. DE-AC07-05ID14517 */ +/* With the U. S. Department of Energy */ +/* */ +/* See COPYRIGHT for full restrictions */ +/****************************************************************/ + /****************************************************************/ /* DO NOT MODIFY OR REMOVE THIS HEADER */ /* FALCON - Fracturing And Liquid CONvection */ diff --git a/tpl/tetgen/tetgen.h b/tpl/tetgen/tetgen.h index 989b57ca..2fa45533 100644 --- a/tpl/tetgen/tetgen.h +++ b/tpl/tetgen/tetgen.h @@ -1,3 +1,17 @@ +/****************************************************************/ +/* DO NOT MODIFY OR REMOVE THIS HEADER */ +/* FALCON - Fracturing And Liquid CONvection */ +/* */ +/* (c) 2012 Battelle Energy Alliance, LLC */ +/* ALL RIGHTS RESERVED */ +/* */ +/* Prepared by Battelle Energy Alliance, LLC */ +/* Under Contract No. DE-AC07-05ID14517 */ +/* With the U. S. Department of Energy */ +/* */ +/* See COPYRIGHT for full restrictions */ +/****************************************************************/ + /////////////////////////////////////////////////////////////////////////////// // // // TetGen // diff --git a/unit/src/SampleTest.C b/unit/src/SampleTest.C index da0782db..8a539147 100644 --- a/unit/src/SampleTest.C +++ b/unit/src/SampleTest.C @@ -1,3 +1,17 @@ +/****************************************************************/ +/* DO NOT MODIFY OR REMOVE THIS HEADER */ +/* FALCON - Fracturing And Liquid CONvection */ +/* */ +/* (c) 2012 Battelle Energy Alliance, LLC */ +/* ALL RIGHTS RESERVED */ +/* */ +/* Prepared by Battelle Energy Alliance, LLC */ +/* Under Contract No. DE-AC07-05ID14517 */ +/* With the U. S. Department of Energy */ +/* */ +/* See COPYRIGHT for full restrictions */ +/****************************************************************/ + //* This file is part of the MOOSE framework //* https://www.mooseframework.org //* diff --git a/unit/src/main.C b/unit/src/main.C index 2a1aafed..0d7b515c 100644 --- a/unit/src/main.C +++ b/unit/src/main.C @@ -1,3 +1,17 @@ +/****************************************************************/ +/* DO NOT MODIFY OR REMOVE THIS HEADER */ +/* FALCON - Fracturing And Liquid CONvection */ +/* */ +/* (c) 2012 Battelle Energy Alliance, LLC */ +/* ALL RIGHTS RESERVED */ +/* */ +/* Prepared by Battelle Energy Alliance, LLC */ +/* Under Contract No. DE-AC07-05ID14517 */ +/* With the U. S. Department of Energy */ +/* */ +/* See COPYRIGHT for full restrictions */ +/****************************************************************/ + //* This file is part of the MOOSE framework //* https://www.mooseframework.org //*