Skip to content

Commit

Permalink
Fix setting various parameters in the API model. (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Clarke authored and einarnn committed Mar 23, 2018
1 parent 98fe4af commit afcb54a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tools/parseAndPopulate/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ def __resolve_maturity_level(self, maturity_level=None):
else:
try:
maturity_level = \
self.jsons.ietf_draft_json[self.name + '.yang'][0].split(
self.jsons.ietf_draft_json['json'][self.name + '.yang'][0].split(
'</a>')[
0].split('\">')[1].split('-')[1]
if 'ietf' in maturity_level:
Expand All @@ -657,7 +657,7 @@ def __resolve_maturity_level(self, maturity_level=None):
# try to find in draft with revision
try:
maturity_level = \
self.jsons.ietf_draft_json[
self.jsons.ietf_draft_json['json'][
self.name + '@' + self.revision + '.yang'][0].split(
'</a>')[0].split('\">')[1].split(
'-')[1]
Expand All @@ -671,14 +671,14 @@ def __resolve_maturity_level(self, maturity_level=None):
pass
# try to find in rfc with revision
try:
maturity_level = self.jsons.ietf_rfc_json[
maturity_level = self.jsons.ietf_rfc_json['json'][
self.name + '@' + self.revision + '.yang']
self.maturity_level = 'ratified'
return
except KeyError:
pass
try:
maturity_level = self.jsons.ietf_rfc_json[self.name + '.yang']
maturity_level = self.jsons.ietf_rfc_json['json'][self.name + '.yang']
self.maturity_level = 'ratified'
return
except KeyError:
Expand All @@ -691,7 +691,7 @@ def __resolve_author_email(self, author_email=None):
else:
try:
email = \
self.jsons.ietf_draft_json[self.name + '.yang'][1].split(
self.jsons.ietf_draft_json['json'][self.name + '.yang'][1].split(
'\">Email')[0].split('mailto:')[1]
self.author_email = email
return
Expand All @@ -700,7 +700,7 @@ def __resolve_author_email(self, author_email=None):
# try to find in draft with revision
try:
email = \
self.jsons.ietf_draft_json[
self.jsons.ietf_draft_json['json'][
self.name + '@' + self.revision + '.yang'][1].split(
'\">Email')[0].split('mailto:')[1]
self.author_email = email
Expand All @@ -709,7 +709,7 @@ def __resolve_author_email(self, author_email=None):
pass
try:
email = \
self.jsons.ietf_draft_example_json[self.name + '.yang'][
self.jsons.ietf_draft_example_json['json'][self.name + '.yang'][
1].split(
'\">Email')[0].split('mailto:')[1]
self.author_email = email
Expand All @@ -719,7 +719,7 @@ def __resolve_author_email(self, author_email=None):
# try to find in draft with revision
try:
email = \
self.jsons.ietf_draft_example_json[
self.jsons.ietf_draft_example_json['json'][
self.name + '@' + self.revision + '.yang'][1].split(
'\">Email')[0].split('mailto:')[1]
self.author_email = email
Expand All @@ -732,7 +732,7 @@ def __resolve_working_group(self):
if self.organization == 'ietf':
try:
self.ietf_wg = \
self.jsons.ietf_draft_json[self.name + '.yang'][0].split(
self.jsons.ietf_draft_json['json'][self.name + '.yang'][0].split(
'</a>')[
0].split('\">')[1].split('-')[2]
return
Expand All @@ -741,7 +741,7 @@ def __resolve_working_group(self):
# try to find in draft with revision
try:
self.ietf_wg = \
self.jsons.ietf_draft_json[
self.jsons.ietf_draft_json['json'][
self.name + '@' + self.revision + '.yang'][
0].split('</a>')[0].split('\">')[1].split('-')[2]
return
Expand Down

0 comments on commit afcb54a

Please sign in to comment.