@@ -14,7 +14,7 @@ def get_astropy_credits(warner=print):
1414 returns False if the repo can't be found.
1515 """
1616 import os
17- from urllib2 import urlopen
17+ from urllib . request import urlopen
1818
1919 creditspath = os .environ .get ('ASTROPY_REPO_PATH' , 'http://raw.github.com/astropy/astropy/main/docs/credits.rst' )
2020
@@ -96,11 +96,14 @@ def process_html(fn, newcoordinators, newcontributors, indent='\t\t\t'):
9696 lines .extend ([(indent + '<li>' + c + '</li>' ) for c in newcontributors ])
9797 lines .append (l )
9898 incontrib = False
99+ else :
100+ if '<ul class="team">' in l :
101+ lines .append (l )
99102 #skip otherwise
100103 else :
101104 if '<ul class="coordinators">' in l :
102105 incoord = True
103- elif '<ul class="team ">' in l :
106+ elif '<h3 id="core-package-contributors ">' in l :
104107 incontrib = True
105108 lines .append (l )
106109
@@ -115,8 +118,8 @@ def process_html(fn, newcoordinators, newcontributors, indent='\t\t\t'):
115118 coordinators = extract_names_list (dt , 'Astropy Project Coordinators' )
116119 contributors = extract_names_list (dt , 'Core Package Contributors' )
117120
118- newhtml = process_html ('about .html' , coordinators , contributors )
119- print ('Replacing "about .html" with updated version. Be sure to "git diff '
120- 'about .html" before committing to ensure no funny business happened.' )
121- with open ('about .html' , 'w ' ) as f :
121+ newhtml = process_html ('team .html' , coordinators , contributors )
122+ print ('Replacing "team .html" with updated version. Be sure to "git diff '
123+ 'team .html" before committing to ensure no funny business happened.' )
124+ with open ('team .html' , 'wb ' ) as f :
122125 f .write (newhtml .encode ('UTF-8' ))
0 commit comments