izar / pytm

A Pythonic framework for threat modeling
Other
861 stars 161 forks source link

Added a first draft for #234 #235

Closed raphaelahrens closed 4 months ago

raphaelahrens commented 4 months ago

In #234 @colesmj suggested to move the import of pydal into the sqlDumb function. This commit does this and if the import fails raises an UIError with an explanation on how to proceed. The text is just a first draft.

To move the import the function get_table was also moved inside the sqlDump function.

raphaelahrens commented 4 months ago

Maybe you could add an explanation in the readme with instructions on how to proceed, which then can be linked in the error message.

izar commented 4 months ago

Love the Freudian slip in the commit message :) What happened to lines 1215-1223 ?

raphaelahrens commented 4 months ago

Love the Freudian slip in the commit message :) What happened to lines 1215-1223 ?

The function was moved from the the class into the method sqlDumP. Since the get_table method is not using self and is only used inside of the sqlDump method. This was necessary because of the use of pydal.Field.