We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e45f8ff commit 416d30aCopy full SHA for 416d30a
otsserver/rpc.py
@@ -71,22 +71,16 @@ def get_tip(self):
71
72
def get_backup(self):
73
chunk = self.path[len('/experimental/backup/'):]
74
+ result = b''
75
try:
76
chunk = int(chunk)
77
+ result = self.backup[chunk]
78
except:
79
self.send_response(404)
80
self.send_header('Content-type', 'text/plain')
81
self.end_headers()
82
return
83
- result = self.backup[chunk]
-
84
- if result is None:
85
- self.send_response(404)
86
- self.send_header('Content-type', 'text/plain')
87
- self.end_headers()
88
- return
89
90
self.send_response(200)
91
self.send_header('Content-type', 'application/octet-stream')
92
self.send_header('Cache-Control', 'public, max-age=31536000')
0 commit comments