bugfix
This commit is contained in:
parent
aa578c3980
commit
7a39ed5986
@ -1,20 +1,9 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
from nanoid import generate
|
||||||
node = None
|
|
||||||
|
|
||||||
def setNode(n='ff001122334455'):
|
def setNode(n='ff001122334455'):
|
||||||
global node
|
pass
|
||||||
if len(n)>12:
|
|
||||||
return
|
|
||||||
for c in n:
|
|
||||||
if c not in ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']:
|
|
||||||
return
|
|
||||||
node = eval('0x' + n + 'L')
|
|
||||||
|
|
||||||
def getID():
|
def getID(size=21):
|
||||||
global node
|
return generate(size=size)
|
||||||
if node is None:
|
|
||||||
node = uuid.getnode()
|
|
||||||
u = uuid.uuid1(node)
|
|
||||||
return u.hex
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
xlrd
|
xlrd
|
||||||
xlwt
|
xlwt
|
||||||
|
naroid
|
||||||
psutil
|
psutil
|
||||||
ujson
|
ujson
|
||||||
numpy
|
numpy
|
||||||
|
Loading…
Reference in New Issue
Block a user