We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 981ae27 commit b9ff9faCopy full SHA for b9ff9fa
1 file changed
src/peerjs/ext/http_proxy.py
@@ -92,14 +92,17 @@ def _savePeerId(peerId=None):
92
93
94
def _loadPeerId():
95
+ """Load and reuse saved peer ID if there is one."""
96
global savedPeerId
97
conf_file = Path(PEERID_FILE)
98
if conf_file.exists():
99
conf = {}
100
with conf_file.open() as infile:
101
conf = yaml.load(infile)
- savedPeerId = conf.get('peerId', None)
102
-
+ if conf is not None:
103
+ savedPeerId = conf.get('peerId', None)
104
+ else:
105
+ savedPeerId = None
106
107
def _loadConfig():
108
global config
0 commit comments