comparison taginthemiddle/model.py @ 8:fc3491dfe374

correct function signature for reading tags file
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 05 May 2010 22:16:25 -0700
parents 1182315b18ac
children 12344c001831
comparison
equal deleted inserted replaced
7:52208e38e5b3 8:fc3491dfe374
25 f = file(path, 'w') 25 f = file(path, 'w')
26 f.close() 26 f.close()
27 self.tags = {} 27 self.tags = {}
28 self.urls = {} 28 self.urls = {}
29 self.times = {} 29 self.times = {}
30 self.read(path) 30 self.read()
31
32 31
33 def read(self): 32 def read(self):
34 for line in file(path).readlines(): 33 for line in file(self.path).readlines():
35 line = line.strip() 34 line = line.strip()
36 if not line: 35 if not line:
37 continue 36 continue
38 tag, urls = line.split('=', 1) # asserts '=' in line 37 tag, urls = line.split('=', 1) # asserts '=' in line
39 tag = tag.strip() 38 tag = tag.strip()