You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JarFile.class_count attempts to take the len() of a generator object.
$ python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from jawa.jf import JarFile
>>> JarFile().class_count
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\Python27\lib\site-packages\jawa\jf.py", line 54, in class_count
return len(p for p in self.namelist if p.endswith('.class'))
TypeError: object of type 'generator' has no len()
Suggestion: replace line 54 of jf.py with: return len([p for p in self.namelist if p.endswith('.class')])
The text was updated successfully, but these errors were encountered:
JarFile.class_count attempts to take the len() of a generator object.
Suggestion: replace line 54 of jf.py with:
return len([p for p in self.namelist if p.endswith('.class')])
The text was updated successfully, but these errors were encountered: