Commit 0f95ec34 by sikang

bug fix

parent 3cc6fbb7
......@@ -6,14 +6,14 @@ import base64
class StringGarble:
used_names = []
__used_names = []
# 随机串(全小写加下划线,避免和activity混淆重复)
def __gen_rand_str(self):
result = ""
while len(result) == 0 or result in self.__used_names:
result = ''.join(random.sample(
"abcdefghijklmnopqrstuvwxyz", random.randint(5, 10)))
"abcdefghijklmnopqrstuvwxyz", random.randint(5, 15)))
self.__used_names.append(result)
return result
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment