Skip to content

Commit 32b7590

Browse files
authored
Merge pull request #469 from ExaWorks/fix_spurious_warning
Only trigger warning about `project_name` if it's being set to something
2 parents 15755f4 + ff675ab commit 32b7590

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/psij/job_attributes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def project_name(self) -> Optional[str]:
166166

167167
@project_name.setter
168168
def project_name(self, project_name: Optional[str]) -> None:
169-
logger.warning('The "project_name" attribute is deprecated. Please use the "account" '
170-
'attribute instead.')
169+
if project_name is not None:
170+
logger.warning('The "project_name" attribute is deprecated. Please use the "account" '
171+
'attribute instead.')
171172
self.account = project_name

0 commit comments

Comments
 (0)