@@ -9,7 +9,7 @@ class MainPageGenerator:
9
9
# @param cmsVer is version of CMSSW.
10
10
def __init__ (self , dataPath , path , cmsVer = "" ):
11
11
self .path = path
12
- self .dataPath = dataPath
12
+ self .dataPath = dataPath
13
13
14
14
self .CMSVER = cmsVer
15
15
@@ -198,22 +198,24 @@ def PrepareData(self):
198
198
contents = soup .find ("div" , { "class" : "contents" })
199
199
tr = contents .findAll ("tr" , {})
200
200
self .classes = {}
201
+ origin = 0
202
+ if tr [0 ].text == 'src' : origin = - 1
201
203
# depth of interface items can be only 3
202
204
flag = False
203
205
for i in tr :
204
- if self .__GetHTMLItemDepth (i ) == 1 :
206
+ if self .__GetHTMLItemDepth (i ) + origin == 1 :
205
207
self .classes [i .text ] = {}
206
208
level1 = i .text
207
209
flag = False
208
210
209
- if self .__GetHTMLItemDepth (i ) == 2 :
211
+ if self .__GetHTMLItemDepth (i ) + origin == 2 :
210
212
self .classes [level1 ][i .text ] = {}
211
213
level2 = i .text
212
214
flag = False
213
215
214
- if self .__GetHTMLItemDepth (i ) == 3 and i .text == u'interface' :
216
+ if self .__GetHTMLItemDepth (i ) + origin == 3 and i .text == u'interface' :
215
217
flag = True
216
- if self .__GetHTMLItemDepth (i ) == 3 and i .text != u'interface' :
218
+ if self .__GetHTMLItemDepth (i ) + origin == 3 and i .text != u'interface' :
217
219
flag = False
218
220
219
221
# print i.text, self.__GetHTMLItemDepth(i)
@@ -418,9 +420,9 @@ def HTMLTreeAddItem(self, title, links = None, endNode = False, folder = False):
418
420
html = html + '\t <span class="file">%s</span>\n ' % title
419
421
return html + '\t </li>\n '
420
422
421
- if len (sys .argv ) == 5 :
423
+ if len (sys .argv ) == 5 :
422
424
DATA_PATH = sys .argv [1 ]
423
- PATH = sys .argv [2 ]
425
+ PATH = sys .argv [2 ]
424
426
VER = sys .argv [3 ]
425
427
OUTF = sys .argv [4 ]
426
428
0 commit comments