Skip to content

Commit 4499c89

Browse files
authored
optimization (Azure#27639)
1 parent 2bf082f commit 4499c89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/azure-sdk-tools/packaging_tools/sdk_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ def del_outdated_samples(readme: str):
3232

3333
with open(python_readme, "r") as file_in:
3434
content = file_in.readlines()
35-
pattern = "$(python-sdks-folder)"
35+
pattern = ["$(python-sdks-folder)", "azure-mgmt-"]
3636
for line in content:
37-
if pattern in line:
37+
if all(p in line for p in pattern):
3838
sdk_folder = re.findall("[a-z]+/[a-z]+-[a-z]+-[a-z]+", line)[0]
3939
sample_folder = Path(f"sdk/{sdk_folder}/generated_samples")
4040
if sample_folder.exists():

0 commit comments

Comments
 (0)