Skip to content

Commit e14bfb4

Browse files
Update get_package_properties.py logic for python 2.7 (#17144)
1 parent b1fa698 commit e14bfb4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

eng/scripts/Language-Settings.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ $BlobStorageUrl = "https://azuresdkdocs.blob.core.windows.net/%24web?restype=con
88
function Get-AllPackageInfoFromRepo ($serviceDirectory)
99
{
1010
$allPackageProps = @()
11-
$searchPath = Join-Path sdk * * setup.py
11+
$searchPath = "sdk"
1212
if ($serviceDirectory)
1313
{
14-
$searchPath = Join-Path sdk ${serviceDirectory} * setup.py
14+
$searchPath = Join-Path sdk ${serviceDirectory}
1515
}
1616

1717
$allPkgPropLines = $null

eng/scripts/get_package_properties.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
parser.add_argument('-s', '--search_path', required=True, help='The scope of the search')
1212
args = parser.parse_args()
1313

14-
for p in glob.glob(args.search_path, recursive=True):
15-
if os.path.basename(os.path.dirname(p)) != 'azure-mgmt' and os.path.basename(os.path.dirname(p)) != 'azure' and os.path.basename(os.path.dirname(p)) != 'azure-storage':
16-
print(get_package_properties(os.path.dirname(p)))
14+
for root, dirs, files in os.walk(args.search_path):
15+
for filename in files:
16+
if os.path.basename(filename) == "setup.py":
17+
if os.path.basename(root) != 'azure-mgmt' and os.path.basename(root) != 'azure' and os.path.basename(root) != 'azure-storage' and os.path.basename(root) != 'tests':
18+
print(get_package_properties(root))

0 commit comments

Comments
 (0)