Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #193 from jkukul/master
Browse files Browse the repository at this point in the history
Use InvalidInputException instead of OutOfNNException.
  • Loading branch information
ravwojdyla committed Mar 3, 2016
2 parents 530aa1d + 1aab8ed commit 0ea003b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Development
===========

Make sure to read about development
[here](http://spotify.github.io/snakebite/development.html) and about
testing over [here](http://spotify.github.io/snakebite/testing.html),
[here](http://snakebite.readthedocs.org/en/latest/development.html) and about
testing over [here](http://snakebite.readthedocs.org/en/latest/testing.html),
hack and come back with a pull requests <3

Travis CI status: [![Travis](https://api.travis-ci.org/spotify/snakebite.png)](https://travis-ci.org/spotify/snakebite)
Expand Down
2 changes: 1 addition & 1 deletion snakebite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1496,5 +1496,5 @@ def __init__(self, hadoop_version=Namenode.DEFAULT_VERSION, effective_user=None,
configs = HDFSConfig.get_external_config()
nns = [Namenode(nn['namenode'], nn['port'], hadoop_version) for nn in configs['namenodes']]
if not nns:
raise OutOfNNException("Tried and failed to find namenodes - couldn't created the client!")
raise InvalidInputException("List of namenodes is empty - couldn't create the client")
super(AutoConfigClient, self).__init__(nns, configs.get('use_trash', False), effective_user, configs.get('use_sasl', False), configs.get('hdfs_namenode_principal', None))
2 changes: 1 addition & 1 deletion test/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ def test_empty_namenodes_autoclient(self, environ_get):
environ_get.return_value = False
HDFSConfig.hdfs_try_paths = ()
HDFSConfig.core_try_paths = ()
self.assertRaises(OutOfNNException, AutoConfigClient)
self.assertRaises(InvalidInputException, AutoConfigClient)

0 comments on commit 0ea003b

Please sign in to comment.