IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 3e6ced5b authored by ralfulrich's avatar ralfulrich
Browse files

improve stability and printout

parent d156f852
No related branches found
No related tags found
2 merge requests!234WIP: Initial example of python as script language from C++,!208Delete AUTHORS file
...@@ -10,7 +10,6 @@ import re ...@@ -10,7 +10,6 @@ import re
text = """/* text = """/*
* (c) Copyright YEAR CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright YEAR CORSIKA Project, corsika-project@lists.kit.edu
* *
*
* This software is distributed under the terms of the GNU General Public * This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license. * the license.
...@@ -22,7 +21,7 @@ Debug settings are 0: nothing, 1: checking, 2: filesystem ...@@ -22,7 +21,7 @@ Debug settings are 0: nothing, 1: checking, 2: filesystem
""" """
Debug = 0 Debug = 0
excludeDirs = ["ThirdParty", "git"] excludeDirs = ["ThirdParty", "git", "build", "install"]
excludeFiles = ['PhysicalConstants.h','CorsikaFenvOSX.cc', 'sgn.h'] excludeFiles = ['PhysicalConstants.h','CorsikaFenvOSX.cc', 'sgn.h']
extensions = [".cc", ".h", ".test"] extensions = [".cc", ".h", ".test"]
...@@ -111,7 +110,7 @@ def checkNote(filename, justCheck, forYear): ...@@ -111,7 +110,7 @@ def checkNote(filename, justCheck, forYear):
if not re.match(regex, lines[startNote[0]+iLine].strip(" \n")): if not re.match(regex, lines[startNote[0]+iLine].strip(" \n")):
isSame = False isSame = False
foundMissing = True foundMissing = True
print ("needs update: " + filename + " new=\'" + noteLines[iLine] + "\' vs old=\'" + lines[startNote[0]+iLine].rstrip('\n') + "\'") print ("needs update: " + filename + "\n [diff] new=\'" + noteLines[iLine] + "\' vs old=\'" + lines[startNote[0]+iLine].rstrip('\n') + "\'")
break break
if Debug>0: if Debug>0:
print ("isSame=" + str(isSame) + " " + str(len(startNote))) print ("isSame=" + str(isSame) + " " + str(len(startNote)))
...@@ -129,7 +128,7 @@ def checkNote(filename, justCheck, forYear): ...@@ -129,7 +128,7 @@ def checkNote(filename, justCheck, forYear):
return return
""" add (new) copyright notice here: """ """ add (new) copyright notice here: """
print ("File: " + filename + ", make copy to " + filename+".bak") print (" [file] " + filename + " --> backup to " + filename+".bak")
os.rename(filename, filename+".bak") os.rename(filename, filename+".bak")
with open(filename, "w") as file: with open(filename, "w") as file:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment