Skip to content

Commit 52ba1d5

Browse files
committed
fix scope visibility in python and add assert
1 parent 416d30a commit 52ba1d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

otsserver/rpc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def get_tip(self):
7171

7272
def get_backup(self):
7373
chunk = self.path[len('/experimental/backup/'):]
74-
result = b''
7574
try:
7675
chunk = int(chunk)
7776
result = self.backup[chunk]
@@ -81,6 +80,7 @@ def get_backup(self):
8180
self.end_headers()
8281
return
8382

83+
assert result is not None
8484
self.send_response(200)
8585
self.send_header('Content-type', 'application/octet-stream')
8686
self.send_header('Cache-Control', 'public, max-age=31536000')

0 commit comments

Comments
 (0)