ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FreeBSDAdmin/Reminder/bank.py
Revision: 1229
Committed: 2009-10-03T22:58:25-07:00 (15 years, 9 months ago) by douglas
Content type: text/x-python
File size: 511 byte(s)
Log Message:
Use Python keyring!

File Contents

# User Rev Content
1 douglas 1179 # Bank
2 douglas 1178 #
3     # Douglas Thrift
4     #
5     # $Id$
6    
7 douglas 1179 class Bank(object):
8     def __init__(self, config):
9     self.__config = config
10 douglas 1178
11 douglas 1179 def accounts(self):
12 douglas 1180 return map(lambda account: (account[0], int(account[1])), map(lambda account: tuple(account.split(':', 1)), self.__config.getlist('accounts')))
13 douglas 1178
14     def download(self, account):
15     raise NotImplementedError
16    
17     def due(self, account):
18     raise NotImplementedError
19    
20 douglas 1179 def _username(self):
21 douglas 1229 return self.__config.getusername()
22 douglas 1178
23 douglas 1179 def _password(self):
24 douglas 1229 return self.__config.getpassword()

Properties

Name Value
svn:keywords Id