Commit e1e70de6b3d4209274f83fa46e968f2621585f82
1 parent
3cae86e6
oleid: small bugfix, close olefile only if opened
Showing
1 changed file
with
2 additions
and
1 deletions
oletools/oleid.py
| @@ -289,7 +289,8 @@ class OleID(object): | @@ -289,7 +289,8 @@ class OleID(object): | ||
| 289 | self.check_macros() | 289 | self.check_macros() |
| 290 | self.check_object_pool() | 290 | self.check_object_pool() |
| 291 | self.check_flash() | 291 | self.check_flash() |
| 292 | - self.ole.close() | 292 | + if self.ole is not None: |
| 293 | + self.ole.close() | ||
| 293 | return self.indicators | 294 | return self.indicators |
| 294 | 295 | ||
| 295 | def check_properties(self): | 296 | def check_properties(self): |