diff --git a/gui/gui.py b/gui/gui.py index b72e7c7..88e507f 100644 --- a/gui/gui.py +++ b/gui/gui.py @@ -1,4 +1,4 @@ -from gui.utils import nassi, output, file_there +from gui.utils import nassi, output from interpreter.interpret_source import JavaSyntaxError, ScopeNotFoundException, InterpreterException from enum import IntEnum @@ -189,7 +189,6 @@ class Gui: if output_name is None: sg.popup_auto_close('You didn\'t set a name for the image, it will be named randomly.') output_name = secrets.token_hex(16) - #if file_there((output_path + '/')) is True: nassi(input_path=file_path, output_path=output_path, outputname=output_name, gui=self, font_filepath=font_filepath, behaviour=exists_choice) diff --git a/gui/utils.py b/gui/utils.py index 420e7da..79a5c3f 100644 --- a/gui/utils.py +++ b/gui/utils.py @@ -27,8 +27,4 @@ def output(values): if os.path.isfile(os.path.join(output_path, f)) and f.lower().endswith(('.png', '.gif')) ] - return fnames - - -def file_there(file): - return os.path.exists(str(file)) + return fnames \ No newline at end of file diff --git a/interpreter/NassiShneidermann.py b/interpreter/NassiShneidermann.py index 7b39516..833be58 100644 --- a/interpreter/NassiShneidermann.py +++ b/interpreter/NassiShneidermann.py @@ -48,7 +48,7 @@ class NassiShneidermanDiagram: x, y = instruction.to_image(x, y, 1000) def check_conflicts(self, filepath:str, behavoiur: Overwrite_behaviour): - if os.path.exists(filepath+".png"): + if os.path.exists(filepath + ".png"): if behavoiur == OB.SKIP: return None elif behavoiur == OB.OVERWWRITE: