Skip to content

Commit

Permalink
Return empty list in case of no user subscriptions. Fixes rucio#6233
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderrichards authored and bari12 committed Jan 23, 2024
1 parent dd581ee commit b89a554
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/rucio/client/subscriptionclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ def list_subscriptions(self, name=None, account=None):
result = self._send_request(url, type_='GET')
if result.status_code == codes.ok: # pylint: disable=no-member
return self._load_json_data(result)
else:
exc_cls, exc_msg = self._get_exception(headers=result.headers, status_code=result.status_code, data=result.content)
raise exc_cls(exc_msg)
if result.status_code == codes.not_found:
return []
exc_cls, exc_msg = self._get_exception(headers=result.headers, status_code=result.status_code, data=result.content)
raise exc_cls(exc_msg)

def update_subscription(self, name, account=None, filter_=None, replication_rules=None, comments=None, lifetime=None, retroactive=None, dry_run=None, priority=None):
"""
Expand Down

0 comments on commit b89a554

Please sign in to comment.