Skip to content

Commit

Permalink
Actually assign fallback value from self.username
Browse files Browse the repository at this point in the history
Several places that intend to use self.username did not actually
assign the return value. This fixes `copr list` without  username argument.
  • Loading branch information
kanru authored and xsuchy committed Feb 26, 2024
1 parent 874cb1b commit 426fc17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/copr_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def parse_chroot_path(self, path):
owner = m.group(2)
if not owner:
try:
self.username
owner = self.username
except:
log.error("Wrong chroot path format '%s'. Use the full "
"'<owner>/<project>/<chroot>' format or "
Expand Down Expand Up @@ -621,7 +621,7 @@ def action_list(self, args):
username = args.username
if not username:
try:
self.username
username = self.username
except:
log.error("The 'username|@groupname' not specified. Either "
"specify it, or authenticate to list your projects.")
Expand Down

0 comments on commit 426fc17

Please sign in to comment.