|
Gaudi Framework, version v23r2 |
| Home | Generated: Thu Jun 28 2012 |
parse the More...


Public Member Functions | |
| def | __init__ |
| def | handle_starttag |
| def | handle_endtag |
| def | handle_data |
Public Attributes | |
| patch | |
Private Attributes | |
| _parsingAttachments | |
| _currentFileId | |
| _currentFileData | |
Static Private Attributes | |
| string | __attachments_id__ = "hidsubpartcontentattached" |
parse the
Definition at line 39 of file validate_patch.py.
| def validate_patch::SavannahParser::__init__ | ( | self ) |
Definition at line 41 of file validate_patch.py.
00042 : 00043 HTMLParser.__init__(self) 00044 # data collected 00045 self.patch = None 00046 00047 # parsing flags and temporary data 00048 self._parsingAttachments = 0 # depth of span tag in the attachment block 00049 self._currentFileId = None 00050 self._currentFileData = "" 00051 00052 # temporary storage
| def validate_patch::SavannahParser::handle_data | ( | self, | |
| data | |||
| ) |
Definition at line 78 of file validate_patch.py.
| def validate_patch::SavannahParser::handle_endtag | ( | self, | |
| tag | |||
| ) |
Definition at line 67 of file validate_patch.py.
00068 : 00069 if tag == "span" and self._parsingAttachments: 00070 self._parsingAttachments -= 1 00071 elif tag == "a" and self._currentFileId: 00072 #print self._currentFileData 00073 filename = self._currentFileData.split(":")[-1].strip() 00074 #print filename, self._currentFileId 00075 self.patch.files.append((filename, int(self._currentFileId))) 00076 self._currentFileId = None 00077 self._currentFileData = ""
| def validate_patch::SavannahParser::handle_starttag | ( | self, | |
| tag, | |||
| attrs | |||
| ) |
Definition at line 53 of file validate_patch.py.
00054 : 00055 attrs = dict(attrs) 00056 if tag == "html": 00057 # new file: new patch data 00058 self.patch = PatchData() 00059 elif tag == "span": 00060 if attrs.get("id", None) == self.__attachments_id__: 00061 self._parsingAttachments = 1 00062 elif self._parsingAttachments: 00063 self._parsingAttachments += 1 00064 elif (self._parsingAttachments 00065 and tag == "a" 00066 and "file_id=" in attrs.get("href", "")): self._currentFileId = attrs["href"].split("file_id=")[-1]
string validate_patch::SavannahParser::__attachments_id__ = "hidsubpartcontentattached" [static, private] |
Definition at line 40 of file validate_patch.py.
Definition at line 41 of file validate_patch.py.
Definition at line 41 of file validate_patch.py.
Definition at line 41 of file validate_patch.py.
Definition at line 41 of file validate_patch.py.