Skip to content

Commit 14ac260

Browse files
committed
doing some urllib fixes
1 parent 01df3a4 commit 14ac260

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mpeds_coder.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
from math import ceil
2323
from random import sample, choice
2424

25+
if (sys.version_info < (3, 0)):
26+
import urllib2
27+
else:
28+
import urllib.request
29+
2530
## pandas
2631
import pandas as pd
2732
import numpy as np
@@ -881,7 +886,7 @@ def admin():
881886
jobj = json.loads(res.read())
882887

883888
## get every other entry in this list
884-
pubs = jobj['facet_counts']['facet_fields']['PUBLICATION'][0::2]
889+
pubs = sorted(jobj['facet_counts']['facet_fields']['PUBLICATION'][0::2])
885890

886891
## get user stats for EC
887892
for count, user in db_session.query(func.count(EventCreatorQueue.id), User.username).\

0 commit comments

Comments
 (0)