try: something except: do nothing

How can I make a module do nothing if the try doesnt work?
Now I solved it by just writing nothing to the log file, however I guess this is not the best procedure…

try: 
	os.mkdir(ImgVideoAudioDirectory)
except:
	self.log(Level.INFO, "")

try:
Some code

except:

pass

Use the pass statement

1 Like

Thanks, I’ll try that :laughing:

Hello,
Just wanted to let you and everyone else reading this post that the pass keyword worked.