Skip to content

Commit

Permalink
bug 1737691: remove /tmp listdir debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
willkg committed Nov 19, 2021
1 parent 80d14f2 commit 7abe697
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions socorro/processor/rules/breakpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,8 @@ def tmp_raw_crash_file(tmp_path, raw_crash, crash_id):
path = os.path.join(
tmp_path, f"{crash_id}.{threading.currentThread().getName()}.TEMPORARY.json"
)
try:
with open(path, "w") as fp:
json.dump(dotdict_to_dict(raw_crash), fp)
except OSError:
# If we can't save the file because there isn't enough space, we want to log
# what's there so we can see what's going on
LOGGER.error(
f"OSError: no space: contents of {tmp_path}: {os.listdir(tmp_path)}"
)
if "symbols" in os.listdir(tmp_path):
path = os.path.join(tmp_path, "symbols")
LOGGER.error(f"OSError: contents of {path}: {os.listdir(path)}")

raise
with open(path, "w") as fp:
json.dump(dotdict_to_dict(raw_crash), fp)

try:
yield path
Expand Down

0 comments on commit 7abe697

Please sign in to comment.