mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 14:15:19 -04:00
prettify: fix logger/exception-handling issues
This commit is contained in:
parent
ae3c58dc44
commit
fbd5a8579c
2 changed files with 5 additions and 5 deletions
|
|
@ -449,9 +449,9 @@ def main(argv):
|
|||
shandler.setLevel(level)
|
||||
shandler.setFormatter(logging.Formatter("%(levelname)s %(ffilename)s: %(message)s"))
|
||||
|
||||
prettify_logger = logging.getLogger("prettify-logger")
|
||||
prettify_logger.setLevel(level)
|
||||
prettify_logger.addHandler(shandler)
|
||||
logger = logging.getLogger("prettify-logger")
|
||||
logger.setLevel(level)
|
||||
logger.addHandler(shandler)
|
||||
|
||||
failure = 0
|
||||
total_prettified = 0
|
||||
|
|
|
|||
|
|
@ -1295,9 +1295,9 @@ def rewriteFortranFile(
|
|||
else:
|
||||
implicitUses = None
|
||||
if modulesDict["commonUses"]:
|
||||
inc_fn = COMMON_USES_RE.match(modulesDict["commonUses"]).group(1)
|
||||
inc_absfn = os.path.join(os.path.dirname(orig_filename), inc_fn)
|
||||
try:
|
||||
inc_fn = COMMON_USES_RE.match(modulesDict["commonUses"]).group(1)
|
||||
inc_absfn = os.path.join(os.path.dirname(orig_filename), inc_fn)
|
||||
with open(inc_absfn, "r") as fhandle:
|
||||
implicitUsesRaw = parseUse(fhandle)
|
||||
implicitUses = prepareImplicitUses(implicitUsesRaw["modules"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue