delete unused code

This commit is contained in:
oleting
2020-12-28 19:43:17 +01:00
parent 4aec8a2afd
commit 4df884055a
3 changed files with 3 additions and 8 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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: