Skip to content

Commit

Permalink
fix: not empty list doesn't work?
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeldeib committed Apr 16, 2019
1 parent 13bea65 commit 7ea3228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ def show_api_key(client, application, resource_group_name, api_key=None):

def delete_api_key(client, application, resource_group_name, api_key):
existing_key = list(filter(lambda result: result.name == api_key, client.list(resource_group_name, application)))
if not existing_key:
if existing_key != []:
return client.delete(resource_group_name, application, existing_key[0].id.split('/')[-1])
raise CLIError('--api-key provided but key not found for deletion.')
2 changes: 1 addition & 1 deletion src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
"summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.",
"version": "0.1.1"
},
"sha256Digest": "4dbcd75076683e09e12c1bb8e26057dbdd69da5c3300c735d0fc1a4cd049622b"
"sha256Digest": "487434c50589a18a0186d47b5f6638457190669e42888b2dd416fffd4bbcf621"
}
],
"azure-batch-cli-extensions": [
Expand Down

0 comments on commit 7ea3228

Please sign in to comment.