Skip to content

Commit

Permalink
amend operation seems to be working, now
Browse files Browse the repository at this point in the history
  • Loading branch information
ndenny committed Apr 1, 2025
1 parent b7f6f44 commit 503ace7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 4 additions & 5 deletions bin/bastion.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,15 +450,14 @@ def do_amend_asset(self, request):
site = self.site(ark)
asset = site.asset(ark)
vault = self.vault(asset.policy.vault)
result = vault.amend(asset)
action = vault.amend(asset)

request['log.scope'] = "site/{}".format(ark.site)

if result.indicates_success:
blonde = result.body['blonde']
return request.succeeded(result, report = "amended asset {} to {}".format(str(ark), str(blonde)))
if action.succeeded:
return request.succeeded(action, report = "amended asset {} to {}".format(str(ark), str(action.blonde)))
else:
return request.failed(result, report = "amend operation on asset {} failed".format(str(ark)))
return request.failed(action, report = "amend operation on asset {} failed".format(str(ark)))

def do_amend_site(self, request):
"""
Expand Down
4 changes: 2 additions & 2 deletions lib/Bastion/Clerks/SFTP.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def assets(self, site, zone):
assets = [ ]
zroot = self.scurler / site / zone
if zroot.exists( ):
for alien in zroot.is_dir():
for alien in zroot:
assets.append(alien.name)
return tuple(sorted(assets))

Expand Down Expand Up @@ -80,7 +80,7 @@ def manifest(self, *args):
if cell.exists:
for alien in cell.lsall():
print("ALIEN: ", alien)
if not alien.is_dir():
if not alien.is_folder:
blondes.append( BLONDE.decode(alien.stem) )
manifest = Manifest(ark, blondes)

Expand Down
2 changes: 2 additions & 0 deletions lib/Bastion/NetOps/sCURL.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ def __init__(self, *args, **kwargs):
#-- Construct the base command given my default configuration. |
#-- All SFTP operations will be built by augmenting the base command ... |
#-- ... with additional flags and arguments. |
#-- As of 2025-04-01 the "--key" flag does nothing, libssh always ... |
#-- assumes the default key, or must use the ssh-keyagent |
#-------------------------------------------------------------------------
basecom = [str(self.CURL)]
#if self.keypath is not None:
Expand Down

0 comments on commit 503ace7

Please sign in to comment.