diff options
Diffstat (limited to 'bin/ansible-galaxy')
-rwxr-xr-x | bin/ansible-galaxy | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ansible-galaxy b/bin/ansible-galaxy index 3cb7fe2c..c280380c 100755 --- a/bin/ansible-galaxy +++ b/bin/ansible-galaxy @@ -27,7 +27,7 @@ from ansible import context from ansible.cli.arguments import option_helpers as opt_help from ansible.errors import AnsibleError, AnsibleOptionsError from ansible.galaxy import Galaxy, get_collections_galaxy_meta_info -from ansible.galaxy.api import GalaxyAPI +from ansible.galaxy.api import GalaxyAPI, GalaxyError from ansible.galaxy.collection import ( build_collection, download_collections, @@ -242,7 +242,7 @@ class GalaxyCLI(CLI): help='The Ansible Galaxy API key which can be found at ' 'https://galaxy.ansible.com/me/preferences.') common.add_argument('-c', '--ignore-certs', action='store_true', dest='ignore_certs', help='Ignore SSL certificate validation errors.', default=None) - common.add_argument('--timeout', dest='timeout', type=int, + common.add_argument('--timeout', dest='timeout', type=int, default=60, help="The time to wait for operations against the galaxy server, defaults to 60s.") opt_help.add_verbosity_options(common) @@ -1214,7 +1214,7 @@ class GalaxyCLI(CLI): remote_data = None try: remote_data = self.api.lookup_role_by_name(role, False) - except AnsibleError as e: + except GalaxyError as e: if e.http_code == 400 and 'Bad Request' in e.message: # Role does not exist in Ansible Galaxy data = u"- the role %s was not found" % role |