Skip to content

Commit 1029556

Browse files
committed
🐛 fix no gease file exception. fix #14
1 parent a4c8c6c commit 1029556

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

changelog.yml

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: gease
22
organisation: moremoban
33
releases:
4+
- changes:
5+
- action: Updated
6+
details:
7+
- "`#14`: failed to use public apis"
8+
date: 18.10.2020
9+
version: 0.0.11
410
- changes:
511
- action: Updated
612
details:

gease/contributors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(self, owner, repo):
4949
try:
5050
get_token()
5151
self.__client = Api.get_api()
52-
except FileNotFoundError:
52+
except exceptions.NoGeaseConfigFound:
5353
self.__client = Api.get_public_api()
5454

5555
@property

tests/test_contributors.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from nose.tools import eq_
33

44
from gease.contributors import EndPoint
5+
from gease.exceptions import NoGeaseConfigFound
56

67

78
class TestPublish:
@@ -32,7 +33,7 @@ def test_all_contributors(self, fake_api, get_token):
3233
@patch("gease.contributors.get_token")
3334
@patch("gease.contributors.Api.get_public_api")
3435
def test_no_names(self, fake_api, get_token):
35-
get_token.side_effect = [FileNotFoundError]
36+
get_token.side_effect = [NoGeaseConfigFound]
3637
sample_reply = [
3738
{"login": "howdy", "url": "https://api.github.com/users/howdy"}
3839
]

0 commit comments

Comments
 (0)