Skip to content

Commit caf94a0

Browse files
committed
REL: replace print stmts with warnings
1 parent 08995e6 commit caf94a0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

chb/relational/CfgMatcher.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
from chb.graphics.DotCfg import DotCfg
3232

3333
import chb.util.fileutil as UF
34+
from chb.util.loggingutil import chklogger
35+
3436

3537
if TYPE_CHECKING:
3638
from chb.app.AppAccess import AppAccess
@@ -290,7 +292,8 @@ def match_blockstrings(self) -> None:
290292
if b1 not in self.blockmapping:
291293
self._blockmapping[b1] = b2
292294
elif self.blockmapping[b1] != b2:
293-
print("Conflicting mapping (strings): " + b1 + ", " + b2)
295+
chklogger.logger.warning(
296+
"Conflicting mapping (strings): %s, %s", b1, b2)
294297

295298
def match_blockcalls(self) -> None:
296299
for (s, (b1s, b2s)) in self._blockcalls.items():
@@ -300,7 +303,8 @@ def match_blockcalls(self) -> None:
300303
if b1 not in self.blockmapping:
301304
self._blockmapping[b1] = b2
302305
elif self.blockmapping[b1] != b2:
303-
print("Conflicting mapping (calls): " + b1 + ", " + b2)
306+
chklogger.logger.warning(
307+
"Conflicting mapping (calls): %s, %s", b1, b2)
304308

305309
def match_branch_conditions(self) -> None:
306310
for (s, (b1s, b2s)) in self._blockbranches.items():
@@ -310,7 +314,8 @@ def match_branch_conditions(self) -> None:
310314
if b1 not in self.blockmapping:
311315
self._blockmapping[b1] = b2
312316
elif self.blockmapping[b1] != b2:
313-
print("Conflicting mapping (branches): " + b1 + ", " + b2)
317+
chklogger.logger.warning(
318+
"Conflicting mapping (branches): %s, %s", b1, b2)
314319

315320
def match_edges(self) -> None:
316321

0 commit comments

Comments
 (0)