Skip to content

Commit

Permalink
Core & Internals: check scope attributes before accessing them
Browse files Browse the repository at this point in the history
  • Loading branch information
rdimaio committed Apr 26, 2024
1 parent 5232980 commit 2b0044a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rucio/core/transfer.py
Expand Up @@ -230,7 +230,8 @@ def _generate_dest_url(cls, dst: TransferDestination, rws: RequestWithSources, p
dsn = get_dsn(rws.scope, rws.name, rws.attributes.get('dsn', None))
# DQ2 path always starts with /, but prefix might not end with /
naming_convention = dst.rse.attributes.get(RseAttr.NAMING_CONVENTION, None)
dest_path = construct_surl(dsn, rws.scope.external, rws.name, naming_convention)
if rws.scope.external is not None:
dest_path = construct_surl(dsn, rws.scope.external, rws.name, naming_convention)
if dst.rse.is_tape():
if rws.retry_count or rws.activity == 'Recovery':
dest_path = '%s_%i' % (dest_path, int(time.time()))
Expand Down

0 comments on commit 2b0044a

Please sign in to comment.