mirror of
https://github.com/barronwaffles/dwc_network_server_emulator.git
synced 2026-07-12 22:21:55 -05:00
Fix some exceptions
This commit is contained in:
parent
c6cb8d0f6f
commit
034a17d535
|
|
@ -276,8 +276,12 @@ class Gamestats(LineReceiver):
|
|||
# The length entire packet SHOULD always be greater than the data field, so this check should be fine.
|
||||
return
|
||||
|
||||
idx = data.index(data_str) + len(data_str)
|
||||
data = data[idx:idx+length]
|
||||
if data_str in data:
|
||||
idx = data.index(data_str) + len(data_str)
|
||||
data = data[idx:idx+length]
|
||||
else:
|
||||
logger.log(logging.ERROR, "ERROR: Could not find \data\ in setpd command: %s", data)
|
||||
data = ""
|
||||
|
||||
self.db.pd_insert(self.profileid, data_parsed['dindex'], data_parsed['ptype'], data)
|
||||
|
||||
|
|
|
|||
|
|
@ -187,8 +187,8 @@ class NasHTTPServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
if "attr3" in post:
|
||||
attr3 = post["attr3"]
|
||||
|
||||
lst = safeloadfi("_list.txt")
|
||||
lst = self.filter_list(dlcfi.read(), attr1, attr2, attr3)
|
||||
dlcfi = safeloadfi("_list.txt")
|
||||
lst = self.filter_list(dlcfi, attr1, attr2, attr3)
|
||||
count = self.get_file_count(lst)
|
||||
|
||||
ret = "%d" % count
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user