From 49982f1207df027ad71973fedfc3ef802118d4b4 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sat, 25 May 2019 12:40:17 -0700 Subject: [PATCH] Add newlines to long log messages --- masque/file/gdsii.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/masque/file/gdsii.py b/masque/file/gdsii.py index 82a3a6f..b5b5a13 100644 --- a/masque/file/gdsii.py +++ b/masque/file/gdsii.py @@ -508,7 +508,7 @@ def _disambiguate_pattern_names(patterns): for pat in patterns: if len(pat.name) > 32: shortened_name = pat.name[:26] - logger.warning('Pattern name "{}" is too long ({}/32 chars),'.format(pat.name, len(pat.name)) + \ + logger.warning('Pattern name "{}" is too long ({}/32 chars),\n'.format(pat.name, len(pat.name)) + ' shortening to "{}" before generating suffix'.format(shortened_name)) else: shortened_name = pat.name @@ -526,15 +526,15 @@ def _disambiguate_pattern_names(patterns): if sanitized_name == '': logger.warning('Empty pattern name saved as "{}"'.format(suffixed_name)) elif suffixed_name != sanitized_name: - logger.warning('Pattern name "{}" ({}) appears multiple times; renaming to "{}"'.format( + logger.warning('Pattern name "{}" ({}) appears multiple times;\n renaming to "{}"'.format( pat.name, sanitized_name, suffixed_name)) encoded_name = suffixed_name.encode('ASCII') if len(encoded_name) == 0: # Should never happen since zero-length names are replaced - raise PatternError('Zero-length name after sanitize+encode, originally "{}"'.format(pat.name)) + raise PatternError('Zero-length name after sanitize+encode,\n originally "{}"'.format(pat.name)) if len(encoded_name) > 32: - raise PatternError('Pattern name "{}" length > 32 after encode, originally "{}"'.format(encoded_name, pat.name)) + raise PatternError('Pattern name "{}" length > 32 after encode,\n originally "{}"'.format(encoded_name, pat.name)) pat.name = encoded_name used_names.append(suffixed_name)