Added some puzzle thingsy

This commit is contained in:
RussellChamp committed 2018-02-28 21:11:39 +00:00
1 parent 746f1091bb
commit 4fa28ac636
4 files changed
+43 -1

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/python
import json
names_file='/home/jumblesale/Code/canonical_names/canonical_names.json'
def get_name(name):
try:
with open(names_file) as names_data:
names = json.load(names_data)
try:
return names[name]["userName"]
except KeyError:
return name
except IOError:
return name # if we didn't already