Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9341164
D7827.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
641 B
Subscribers
None
D7827.diff
View Options
diff --git a/swh/loader/core/loader.py b/swh/loader/core/loader.py
--- a/swh/loader/core/loader.py
+++ b/swh/loader/core/loader.py
@@ -362,6 +362,8 @@
total_time_store_data = 0.0
try:
+ # Initially not a success, will be True when actually one
+ success = False
with self.statsd_timed("prepare"):
self.prepare()
@@ -395,7 +397,6 @@
):
self.post_load()
except Exception as e:
- success = False
if isinstance(e, NotFound):
status = "not_found"
task_status = "uneventful"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 11:47 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225050
Attached To
D7827: Initialize the success boolean early to avoid unbound exception
Event Timeline
Log In to Comment