OSDN Git Service
(root)
/
fukui-no-namari
/
fukui-no-namari.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a2089c4
)
Fix a bug.
author
Aiwota Programmer
<aiwotaprog@tetteke.tk>
Sun, 24 Sep 2006 04:44:10 +0000
(13:44 +0900)
committer
Aiwota Programmer
<aiwotaprog@tetteke.tk>
Sun, 24 Sep 2006 04:44:10 +0000
(13:44 +0900)
src/FukuiNoNamari/board_data.py
patch
|
blob
|
history
diff --git
a/src/FukuiNoNamari/board_data.py
b/src/FukuiNoNamari/board_data.py
index
b881f5e
..
767f7fc
100644
(file)
--- a/
src/FukuiNoNamari/board_data.py
+++ b/
src/FukuiNoNamari/board_data.py
@@
-265,11
+265,16
@@
class BoardData:
# union
iterable = itertools.imap(lambda x, y: x, iterable, iterable_len)
# union
iterable = itertools.imap(lambda x, y: x, iterable, iterable_len)
- for num, line_encoded in itertools.izip(itertools.count(1), iterable):
- result = self._split_record(line_encoded)
- if result:
- id, title, res = result
- yield id, title, res, num, lastmod
+ iterable = itertools.izip(itertools.count(1), iterable)
+
+ def main_process():
+ for num, line_encoded in iterable:
+ result = self._split_record(line_encoded)
+ if result:
+ id, title, res = result
+ yield id, title, res, num, lastmod
+
+ return main_process()
def _get_subjecttxt(self):
def _get_subjecttxt(self):
@@
-283,12
+288,12
@@
class BoardData:
except urllib2.HTTPError, e:
gobject.idle_add(self.set_status, "%d %s" % (e.code, e.msg))
print "switch to local"
except urllib2.HTTPError, e:
gobject.idle_add(self.set_status, "%d %s" % (e.code, e.msg))
print "switch to local"
-
self._load_subjecttxt(func
)
+
return self._load_subjecttxt(
)
except urllib2.URLError, e:
print e
gobject.idle_add(self.set_status, str(e))
print "switch to local"
except urllib2.URLError, e:
print e
gobject.idle_add(self.set_status, str(e))
print "switch to local"
-
self._load_subjecttxt(func
)
+
return self._load_subjecttxt(
)
else:
status = "%d %s" % (response.code, response.msg)
gobject.idle_add(self.set_status, status)
else:
status = "%d %s" % (response.code, response.msg)
gobject.idle_add(self.set_status, status)
@@
-335,13
+340,14
@@
class BoardData:
iterable = itertools.imap(saving, iterable)
iterable = itertools.izip(itertools.count(1), iterable)
iterable = itertools.imap(saving, iterable)
iterable = itertools.izip(itertools.count(1), iterable)
- for num, line_encoded in iterable:
- result = self._split_record(line_encoded)
- if result:
- id, title, res = result
- yield id, title, res, num, lastmod
+ def main_process():
+ for num, line_encoded in iterable:
+ result = self._split_record(line_encoded)
+ if result:
+ id, title, res = result
+ yield id, title, res, num, lastmod
-
f.close
()
+
return main_process
()
def load_board_idx(self):
lastmod = ""
def load_board_idx(self):
lastmod = ""