From 43e472b64767a4aadd44f8a53636850beb5f1ba1 Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Tue, 8 Apr 2014 14:15:49 +0000 Subject: [PATCH] Remove IETFWG_DESCRIPTIONS_PATH which is no longer useful as all charter files will soon have been moved - Legacy-Id: 7582 --- ietf/group/utils.py | 29 +++++++++++------------------ ietf/settings.py | 1 - 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/ietf/group/utils.py b/ietf/group/utils.py index 162049630..89e8cd120 100644 --- a/ietf/group/utils.py +++ b/ietf/group/utils.py @@ -28,28 +28,21 @@ def save_group_in_history(group): def get_charter_text(group): # get file path from settings. Syntesize file name from path, acronym, and suffix + c = group.charter + + # find the latest, preferably approved, revision + for h in group.charter.history_set.exclude(rev="").order_by("time"): + h_appr = "-" not in h.rev + c_appr = "-" not in c.rev + if (h.rev > c.rev and not (c_appr and not h_appr)) or (h_appr and not c_appr): + c = h + + filename = os.path.join(c.get_file_path(), "%s-%s.txt" % (c.canonical_name(), c.rev)) try: - # Try getting charter from new charter tool - c = group.charter - - # find the latest, preferably approved, revision - for h in group.charter.history_set.exclude(rev="").order_by("time"): - h_appr = "-" not in h.rev - c_appr = "-" not in c.rev - if (h.rev > c.rev and not (c_appr and not h_appr)) or (h_appr and not c_appr): - c = h - - filename = os.path.join(c.get_file_path(), "%s-%s.txt" % (c.canonical_name(), c.rev)) with open(filename) as f: return f.read() except IOError: - try: - filename = os.path.join(settings.IETFWG_DESCRIPTIONS_PATH, group.acronym) + ".desc.txt" - desc_file = open(filename) - desc = desc_file.read() - except BaseException: - desc = 'Error Loading Work Group Description' - return desc + return 'Error Loading Group Charter' def get_area_ads_emails(area): if area.acronym == 'none': diff --git a/ietf/settings.py b/ietf/settings.py index 4acfb3841..837f0f34e 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -265,7 +265,6 @@ AGENDA_PATH_PATTERN = '/a/www/www6s/proceedings/%(meeting)s/agenda/%(wg)s.%(ext) MINUTES_PATH_PATTERN = '/a/www/www6s/proceedings/%(meeting)s/minutes/%(wg)s.%(ext)s' SLIDES_PATH_PATTERN = '/a/www/www6s/proceedings/%(meeting)s/slides/%(wg)s-*' IPR_DOCUMENT_PATH = '/a/www/ietf-ftp/ietf/IPR/' -IETFWG_DESCRIPTIONS_PATH = '/a/www/www6s/wg-descriptions/' IESG_TASK_FILE = '/a/www/www6/iesg/internal/task.txt' IESG_ROLL_CALL_FILE = '/a/www/www6/iesg/internal/rollcall.txt' IESG_MINUTES_FILE = '/a/www/www6/iesg/internal/minutes.txt'