summaryrefslogtreecommitdiff
path: root/gitlab/v4/cli.py
diff options
context:
space:
mode:
authorMax Wittig <max.wittig.ch@gmail.com>2021-04-25 16:34:50 +0200
committerGitHub <noreply@github.com>2021-04-25 16:34:50 +0200
commit09522b356386f4e2ceef7e8c2604269e0682ed20 (patch)
treeeadab753e5dd338c64c332a7db06d339bb0ad7ec /gitlab/v4/cli.py
parent0a0fcaf27fe18867d2b4860badb52cafdac555cb (diff)
parent6d551208f4bc68d091a16323ae0d267fbb6003b6 (diff)
downloadgitlab-09522b356386f4e2ceef7e8c2604269e0682ed20.tar.gz
Merge pull request #1410 from JohnVillalovos/jlvillal/short_print_attr
chore: make RESTObject._short_print_attrs always present
Diffstat (limited to 'gitlab/v4/cli.py')
-rw-r--r--gitlab/v4/cli.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py
index d036d12..b03883e 100644
--- a/gitlab/v4/cli.py
+++ b/gitlab/v4/cli.py
@@ -380,7 +380,7 @@ class LegacyPrinter(object):
if obj._id_attr:
id = getattr(obj, obj._id_attr)
print("%s: %s" % (obj._id_attr.replace("_", "-"), id))
- if hasattr(obj, "_short_print_attr"):
+ if obj._short_print_attr:
value = getattr(obj, obj._short_print_attr) or "None"
value = value.replace("\r", "").replace("\n", " ")
# If the attribute is a note (ProjectCommitComment) then we do