rmusser01 / pefile

Automatically exported from code.google.com/p/pefile
Other
0 stars 1 forks source link

pefile.PE for non-empty directory #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reproduction steps ("d:\temp" is non-empty directory):
import pefile
pe = pefile.PE(r"d:\temp")

Result:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~\pefile.py", line 1667, in __init__
    self.__parse__(name, data, fast_load)
  File "~\pefile.py", line 1718, in __parse__
    fd.close()
UnboundLocalError: local variable 'fd' referenced before assignment

Environment:
 * pefile 1.2.10-114
 * Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32
 * Win2k8 R2 SP1

Original issue reported on code.google.com by eretik....@gmail.com on 29 May 2012 at 4:37

GoogleCodeExporter commented 9 years ago
pefile takes the path of a file as argument, not a directory.

Original comment by ero.carr...@gmail.com on 9 Aug 2012 at 11:50