@@ -28,28 +28,21 @@ def save_group_in_history(group):
2828
2929def get_charter_text (group ):
3030 # get file path from settings. Syntesize file name from path, acronym, and suffix
31- try :
32- # Try getting charter from new charter tool
33- c = group .charter
31+ c = group .charter
3432
35- # find the latest, preferably approved, revision
36- for h in group .charter .history_set .exclude (rev = "" ).order_by ("time" ):
37- h_appr = "-" not in h .rev
38- c_appr = "-" not in c .rev
39- if (h .rev > c .rev and not (c_appr and not h_appr )) or (h_appr and not c_appr ):
40- c = h
33+ # find the latest, preferably approved, revision
34+ for h in group .charter .history_set .exclude (rev = "" ).order_by ("time" ):
35+ h_appr = "-" not in h .rev
36+ c_appr = "-" not in c .rev
37+ if (h .rev > c .rev and not (c_appr and not h_appr )) or (h_appr and not c_appr ):
38+ c = h
4139
42- filename = os .path .join (c .get_file_path (), "%s-%s.txt" % (c .canonical_name (), c .rev ))
40+ filename = os .path .join (c .get_file_path (), "%s-%s.txt" % (c .canonical_name (), c .rev ))
41+ try :
4342 with open (filename ) as f :
4443 return f .read ()
4544 except IOError :
46- try :
47- filename = os .path .join (settings .IETFWG_DESCRIPTIONS_PATH , group .acronym ) + ".desc.txt"
48- desc_file = open (filename )
49- desc = desc_file .read ()
50- except BaseException :
51- desc = 'Error Loading Work Group Description'
52- return desc
45+ return 'Error Loading Group Charter'
5346
5447def get_area_ads_emails (area ):
5548 if area .acronym == 'none' :
0 commit comments