uberdog: server starts

This commit is contained in:
John Cote 2019-12-30 15:37:11 -05:00
parent 7c27d594bb
commit f24d5cac59
2 changed files with 3 additions and 10 deletions

View file

@ -1,7 +1,5 @@
import dbm
import dbm.dumb
import json
import sys
import time
from datetime import datetime
@ -24,11 +22,6 @@ class AccountDB:
# Setup the dbm:
accountDbFile = config.GetString('accountdb-local-file', 'astron/databases/accounts.db')
if sys.platform == 'darwin': # macOS
dbm = dumbdbm
else:
dbm = anydbm
self.dbm = dbm.open(accountDbFile, 'c')
def lookup(self, playToken, callback):

View file

@ -45,9 +45,9 @@ class NameGenerator:
input = StreamReader(vfs.openReadFile(filename, 1), 1)
currentLine = input.readline()
while currentLine:
if currentLine.lstrip()[0:1] != '#':
a1 = currentLine.find('*')
a2 = currentLine.find('*', a1 + 1)
if currentLine.lstrip()[0:1] != b'#':
a1 = currentLine.find(b'*')
a2 = currentLine.find(b'*', a1 + 1)
self.nameDictionary[int(currentLine[0:a1])] = (int(currentLine[a1 + 1:a2]), currentLine[a2 + 1:len(currentLine) - 1])
currentLine = input.readline()