예제 #1
0
파일: core.py 프로젝트: thylong/cabu
 def __del__(self):
     if hasattr(self, 'ftp') and self.ftp:  # pragma: no cover
         self.ftp.close()
     if hasattr(self, 'webdriver') and self.webdriver:
         unload_driver(self.webdriver)
     if hasattr(self, 'vdisplay') and self.vdisplay:
         unload_vdisplay(self.vdisplay)
예제 #2
0
파일: core.py 프로젝트: thylong/cabu
 def __exit__(self, *args, **kwargs):  # pragma: no cover
     if hasattr(self, 'ftp'):
         self.ftp.close()
     if hasattr(self, 'webdriver'):
         unload_driver(self.webdriver)
     if hasattr(self, 'vdisplay'):
         unload_vdisplay(self.vdisplay)
     super(Cabu, self).__exit__(*args, **kwargs)