]> Softwares of Agnibho - medscript.git/commitdiff
Suppress AttributeError in new file
authorAgnibho Mondal <mondal@agnibho.com>
Fri, 27 Oct 2023 14:08:10 +0000 (19:38 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Fri, 27 Oct 2023 14:08:10 +0000 (19:38 +0530)
prescription.py

index f9c63a10e72076aca853672c765852ed1493aaab..0ddcf1447f87ffbcaef26e8b21f55d49a2efe829 100644 (file)
@@ -92,6 +92,8 @@ class Prescription:
         with open(file, "w") as f:
             try:
                 del self.file
+            except AttributeError as e:
+                pass
             except Exception as e:
                 print(e)
             f.write(self.get_json())