File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 6
6
7
7
8
8
class BalancedError (Exception ):
9
- pass
9
+
10
+ def __str__ (self ):
11
+ attrs = ', ' .join ([
12
+ '{0}={1}' .format (k , repr (v ))
13
+ for k , v in self .__dict__ .iteritems ()
14
+ ])
15
+ return '{0}({1})' .format (self .__class__ .__name__ , attrs )
10
16
11
17
12
18
class ResourceError (BalancedError ):
Original file line number Diff line number Diff line change @@ -132,8 +132,8 @@ def items(self):
132
132
# there is no resources key in the response from server
133
133
# if the list is empty, so when we try to get something like
134
134
# `debits`, an AttributeError will be raised. Not sure is this
135
- # behavior a bug of server, but anyway, this is just a workaround here
136
- # for solving the problem. The issue was posted here
135
+ # behavior a bug of server, but anyway, this is just a workaround
136
+ # here for solving the problem. The issue was posted here
137
137
# https://github.com/balanced/balanced-python/issues/93
138
138
return []
139
139
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def main():
35
35
36
36
print 'PROTIP: for TEST bank accounts the valid amount is always 1 and 1'
37
37
try :
38
- verification .confirm (amount_1 = 1 , amount_2 = 1 )
38
+ verification .confirm (amount_1 = 1 , amount_2 = 2 )
39
39
except balanced .exc .BankAccountVerificationFailure as ex :
40
40
print 'Authentication error , %s' % ex .message
41
41
You can’t perform that action at this time.
0 commit comments