main.nut: Фикс записи none в uuid
This commit is contained in:
@@ -45,7 +45,8 @@ class PyG2O
|
|||||||
|
|
||||||
function _send(data, uuid = "none")
|
function _send(data, uuid = "none")
|
||||||
{
|
{
|
||||||
data["uuid"] <- uuid;
|
if (!("uuid" in data))
|
||||||
|
data["uuid"] <- uuid;
|
||||||
_connection.send(JSON.dump_ansi(data, 2));
|
_connection.send(JSON.dump_ansi(data, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,12 +86,12 @@ class PyG2O
|
|||||||
local chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()";
|
local chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()";
|
||||||
local result = "";
|
local result = "";
|
||||||
local length = 32;
|
local length = 32;
|
||||||
|
|
||||||
for (local i = 0; i < length; i++) {
|
for (local i = 0; i < length; i++) {
|
||||||
local randomIndex = rand() % chars.len();
|
local randomIndex = rand() % chars.len();
|
||||||
result += chars.slice(randomIndex, randomIndex + 1);
|
result += chars.slice(randomIndex, randomIndex + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user