Skip to content

Commit

Permalink
Adjust main statements (#26458)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenttran-msft authored Sep 27, 2022
1 parent e293d84 commit 34680cc
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def create_file():
print("Created {} files under the directory '{}'.".format(num_child_files, directory_client.path_name))


async def run():
async def main():
account_name = os.getenv('STORAGE_ACCOUNT_NAME', "")
account_key = os.getenv('STORAGE_ACCOUNT_KEY', "")

Expand All @@ -103,4 +103,4 @@ async def run():


if __name__ == '__main__':
asyncio.run(run())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def create_file():
print("Created {} files under the directory '{}'.".format(num_child_files, directory_client.path_name))


async def run():
async def main():
account_name = os.getenv('STORAGE_ACCOUNT_NAME', "")
account_key = os.getenv('STORAGE_ACCOUNT_KEY', "")

Expand All @@ -128,4 +128,4 @@ async def run():


if __name__ == '__main__':
asyncio.run(run())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async def create_file():
print("Created {} files under the directory '{}'.".format(num_child_files, directory_client.path_name))


async def run():
async def main():
account_name = os.getenv('STORAGE_ACCOUNT_NAME', "")
account_key = os.getenv('STORAGE_ACCOUNT_KEY', "")

Expand All @@ -111,4 +111,4 @@ async def run():
await filesystem_client.delete_file_system()

if __name__ == '__main__':
asyncio.run(run())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ async def create_file_from_file_system(self):

await file_system_client.delete_file_system()

async def run():
async def main():
sample = FileSystemSamplesAsync()
await sample.file_system_sample()
await sample.acquire_lease_on_file_system()
Expand All @@ -227,4 +227,4 @@ async def run():
await sample.create_file_from_file_system()

if __name__ == '__main__':
asyncio.run(run())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ async def main():


if __name__ == '__main__':
asyncio.run(run())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

#--Begin DataLake Service Samples-----------------------------------------------------------------

async def data_lake_service_sample():
async def main():

# Instantiate a DataLakeServiceClient using a connection string
# [START create_datalake_service_client]
Expand Down Expand Up @@ -113,4 +113,4 @@ async def data_lake_service_sample():
await token_credential.close()

if __name__ == '__main__':
asyncio.run(data_lake_service_sample())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_random_bytes(size):
return bytes(result)


async def run():
async def main():
account_name = os.getenv('STORAGE_ACCOUNT_NAME', "")
account_key = os.getenv('STORAGE_ACCOUNT_KEY', "")

Expand All @@ -125,4 +125,4 @@ async def run():


if __name__ == '__main__':
asyncio.run(run())
asyncio.run(main())

0 comments on commit 34680cc

Please sign in to comment.