Return all keys if none specified

This commit is contained in:
polaris
2014-06-09 09:10:00 -04:00
parent 173998c88b
commit ac4d659e75
2 changed files with 8 additions and 4 deletions

View File

@@ -316,11 +316,14 @@ class Gamestats(LineReceiver):
else:
self.log(logging.WARNING, "Could not get data section from profile for %d" % (self.profileid))
for key in (key for key in keys if key not in ("__cmd__", "__cmd_val__", "")):
data += "\\" + key + "\\"
if len(keys) > 0:
for key in (key for key in keys if key not in ("__cmd__", "__cmd_val__", "")):
data += "\\" + key + "\\"
if profile_data != None and key in profile_data:
data += profile_data[key]
if profile_data != None and key in profile_data:
data += profile_data[key]
else:
data = profile_data
modified = int(time.time())

View File

@@ -103,6 +103,7 @@ class PlayerSearch(LineReceiver):
msg_d.append(('oldone', ""))
msg = gs_query.create_gamespy_message(msg_d)
logger.log(logging.DEBUG, "SENDING: %s" % msg)
self.transport.write(bytes(msg))
if __name__ == "__main__":