mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-26 15:30:18 +00:00
Check input_file attribut
This commit is contained in:
parent
8e1e2a9c54
commit
a37e039424
@ -625,9 +625,11 @@ class Resource:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Error while executing resource concluded callback from "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)
|
RNS.log("Error while executing resource concluded callback from "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
finally:
|
finally:
|
||||||
if hasattr(self.input_file, "close") and callable(self.input_file.close):
|
|
||||||
try:
|
try:
|
||||||
|
if hasattr(self, "input_file"):
|
||||||
|
if hasattr(self.input_file, "close") and callable(self.input_file.close):
|
||||||
self.input_file.close()
|
self.input_file.close()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Error while closing resource input file: "+str(e), RNS.LOG_ERROR)
|
RNS.log("Error while closing resource input file: "+str(e), RNS.LOG_ERROR)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user