Skip to content

Commit 4daf243

Browse files
committed
Update stamp_subdir for directory_reorg changes
1 parent b3dfd9d commit 4daf243

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

carthage_aws/connection.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2022, 2023, 2024, Hadron Industries, Inc.
1+
# Copyright (C) 2022, 2023, 2024, 2025, Hadron Industries, Inc.
22
# Carthage is free software; you can redistribute it and/or modify
33
# it under the terms of the GNU Lesser General Public License version 3
44
# as published by the Free Software Foundation. It is distributed
@@ -8,7 +8,6 @@
88

99
from pathlib import Path
1010
import asyncio
11-
import os
1211
import typing
1312

1413
import carthage.network
@@ -198,6 +197,15 @@ def resource_types_to_tag(self)-> list:
198197
'''
199198
return [self.resource_type]
200199

200+
@property
201+
def deployable_names(self):
202+
res = []
203+
if name := getattr(self, 'name', None):
204+
res.append(f'{self.resource_type}:{name}')
205+
if hasattr(super(), 'deployable_names'):
206+
res.extend(super().deployable_names)
207+
return res
208+
201209
def should_retag(self) -> bool:
202210
'''Returns true if the resource's current tags do not align
203211
with what :meth:`resource_tags` says they should be.
@@ -504,11 +512,9 @@ async def read_write_hook(self):
504512
'''
505513

506514

507-
@memoproperty
508-
def stamp_path(self):
509-
p = Path(self.config_layout.state_dir)
510-
p = p.joinpath("aws_stamps", self.stamp_type,str(self.id)+".stamps")
511-
os.makedirs(p, exist_ok=True)
515+
@property
516+
def stamp_subdir(self):
517+
p = Path("aws").joinpath(self.stamp_type,str(self.id))
512518
return p
513519

514520
async def dynamic_dependencies(self):

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ disable = [
3535
"C0116", # missing-function-docstring: 1
3636
"C0103", # invalid-name: 1
3737
"W0401", # wildcard-import: 3
38+
'R0901', #too many instance ancestors
3839
"R0902", # too-many-instance-attributes: 5
3940
"C0121", # singleton-comparison: 3
4041
"W0614", # unused-wildcard-import: 3

0 commit comments

Comments
 (0)