Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3f86d36

Browse files
pinxuenejch
authored andcommitted
fix: change return value to "None" in case getattr returns None to prevent error
1 parent43b369f commit3f86d36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎gitlab/v4/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ def display_dict(d: Dict[str, Any], padding: int) -> None:
490490
id=getattr(obj,obj._id_attr)
491491
print(f"{obj._id_attr.replace('_','-')}:{id}")
492492
ifobj._repr_attr:
493-
value=getattr(obj,obj._repr_attr,"None")
493+
value=getattr(obj,obj._repr_attr,"None")or"None"
494494
value=value.replace("\r","").replace("\n"," ")
495495
# If the attribute is a note (ProjectCommitComment) then we do
496496
# some modifications to fit everything on one line

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp