Skip to content

Commit

Permalink
Merge pull request #115 from ecmwf-ifs/113-warnings-raised-with-pytho…
Browse files Browse the repository at this point in the history
…n-310

Fix directive comparison to literal (fix #113)
  • Loading branch information
mlange05 authored Jul 5, 2023
2 parents 080581a + c8ac9f8 commit 45e51fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/loki_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def convert(out_path, path, header, cpp, directive, include, define, omni_includ
else:
config = SchedulerConfig.from_file(config)

directive = None if directive is 'none' else directive.lower()
directive = None if directive.lower() == 'none' else directive.lower()

build_args = {
'preprocess': cpp,
Expand Down Expand Up @@ -447,7 +447,7 @@ def ecphys(mode, config, header, source, build, cpp, directive, frontend):
info('[Loki] Bulk-processing physics using config: %s ', config)
config = SchedulerConfig.from_file(config)

directive = None if directive is 'none' else directive.lower()
directive = None if directive.lower() == 'none' else directive.lower()

frontend = Frontend[frontend.upper()]
frontend_type = Frontend.OFP if frontend == Frontend.OMNI else frontend
Expand Down

0 comments on commit 45e51fd

Please sign in to comment.