Changeset 36537
- Timestamp:
- 01/26/10 18:43:38 (3 years ago)
- Files:
-
- 1 modified
-
lang/python/twopy/trunk/twopy/thread.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/python/twopy/trunk/twopy/thread.py
r36525 r36537 131 131 self.__isBroken = False 132 132 self.__res = len(self.__comments) 133 if response.code == 203:133 elif response.code == 203: 134 134 # Dat落ちと判断(10/01/24現在のanydat.soモジュールの仕様より) 135 135 raise twopy.DatoutError, twopy.Message(["203 Non-Authoritative Information", "203レスポンスヘッダが返されました。このスレッドはDat落ちになったものと考えられます。"]) … … 138 138 139 139 def __appendComments(self, dat): 140 no_tag = re.compile("<.*?>")141 nt = re.compile("(?P<name>.*)</b>(?P<trip>.*)<b>")142 di = re.compile("(?P<date>.*) ID:(?P<id>.*)")143 144 140 num = 0 145 for (i, line) in enumerate(dat.split("\n")):141 for line in dat.split("\n"): 146 142 if len(self.__comments) == 0 : 147 143 columns = line.split("<>") 148 144 self.__title = columns[4] 149 145 if line != "": 150 self.__ comments.append( twopy.Comment(self, line, i+1) )146 self.__res += 1 151 147 num += 1 148 self.__comments.append( twopy.Comment(self, line, self.__res) ) 152 149 return num 153 150 … … 178 175 # datが壊れている場合 179 176 self.__isBroken = True 177 elif response.code == 203: 178 # dat落ちと判断 179 raise twopy.DatoutError, twopy.Message(["203 Non-Authoritative Information", "203レスポンスヘッダが返されました。このスレッドはDat落ちになったものと考えられます。"]) 180 180 else: raise TypeError 181 181
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)