Skip to content

Commit

Permalink
Raise exception earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
Grazfather committed Feb 22, 2024
1 parent 8d9e07e commit 38bfcca
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -10523,8 +10523,6 @@ def read_ascii_string(self, address: int) -> Optional[str]:
def maps(self) -> List[Section]:
if not self.__maps:
self.__maps = self.__parse_maps()
if not self.__maps:
raise RuntimeError("Failed to get memory layout")
return self.__maps

def __parse_maps(self) -> Optional[List[Section]]:
Expand All @@ -10550,7 +10548,7 @@ def __parse_maps(self) -> Optional[List[Section]]:
except:
pass

return None
raise RuntimeError("Failed to get memory layout")

@classmethod
def parse_procfs_maps(cls) -> Generator[Section, None, None]:
Expand Down

0 comments on commit 38bfcca

Please sign in to comment.