2012-08-02 68 views
0

我試着example from pyro docs,我也得到HMAC_KEY沒有設置警告

[email protected]:~/py/pyro$ python greeting.py 
/usr/local/lib/python2.7/dist-packages/Pyro4-4.14-py2.7.egg/Pyro4/core.py:155: UserWarning: HMAC_KEY not set, protocol data may not be secure 
    warnings.warn("HMAC_KEY not set, protocol data may not be secure") 
Ready. Object uri = PYRO:[email protected]:48766 

如何避免呢? (這個例子,儘管如此,作品)

另外,如何分離pyro的守護進程的過程?

而且 - example with name server不工作:

[email protected]:~/py/pyro$ python name_server.py 
/usr/local/lib/python2.7/dist-packages/Pyro4-4.14-py2.7.egg/Pyro4/core.py:155: UserWarning: HMAC_KEY not set, protocol data may not be secure 
    warnings.warn("HMAC_KEY not set, protocol data may not be secure") 
Traceback (most recent call last): 
    File "name_server.py", line 11, in <module> 
    ns=Pyro4.locateNS()     # find the name server 
    File "/usr/local/lib/python2.7/dist-packages/Pyro4-4.14-py2.7.egg/Pyro4/naming.py", line 323, in locateNS 
    raise Pyro4.errors.NamingError("Failed to locate the nameserver") 
Pyro4.errors.NamingError: Failed to locate the nameserver 

回答

2

有應該是Pyro4.config.HMAC_KEY = 'the_same_string_for_server_and_client' 的規定......在某處焦文檔(丟了)