Adding callstack to debug output for easier debugging. Removed hardcoded debug crash

This commit is contained in:
Anton Hvornum 2021-03-29 15:55:36 +02:00
parent e94a8d8b25
commit 0e26975247
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import glob, re, os, json, time, hashlib
import pathlib
import pathlib, traceback
from collections import OrderedDict
from .exceptions import DiskError
from .general import *
@ -452,9 +452,9 @@ class Filesystem():
self.blockdevice.partition[1].allow_formatting = True
if encrypt_root_partition:
raise ValueError("moo")
exit(1)
log(f"Marking partition {self.blockdevice.partition[1]} as encrypted.", level=LOG_LEVELS.Debug)
log(f"Callstrack when marking the partition: {''.join(traceback.format_stack())}", level=LOG_LEVELS.Debug)
self.blockdevice.partition[1].encrypted = True
def add_partition(self, type, start, end, format=None):