File reads are cheap. Don't cache the VNC token key in the server code
[invirt/packages/invirt-vnc-server.git] / python / vnc / extauth.py
index b7351a3..a2cd570 100644 (file)
@@ -20,10 +20,7 @@ import socket
 import time
 
 def getTokenKey():
-    token_key = file('/etc/invirt/secrets/vnc-key').read().strip()
-    while True:
-        yield token_key
-getTokenKey = getTokenKey().next
+    return file('/etc/invirt/secrets/vnc-key').read().strip()
 
 def getPort(name, auth_data):
     import get_port