uberdog: server starts
This commit is contained in:
parent
7c27d594bb
commit
f24d5cac59
2 changed files with 3 additions and 10 deletions
|
@ -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):
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue