Bug ID |
8995
|
Summary |
make-dissector-reg.py fails if system python is version 3+
|
Classification |
Unclassified
|
Product |
Wireshark
|
Version |
1.10.1
|
Hardware |
x86-64
|
OS |
Linux (other)
|
Status |
UNCONFIRMED
|
Severity |
Trivial
|
Priority |
Low
|
Component |
Dissection engine (libwireshark)
|
Assignee |
[email protected]
|
Reporter |
[email protected]
|
Build Information:
wireshark 1.10.1 (SVN Rev Unknown from unknown)
Compiled (64-bit) with GTK+ 3.8.2, with Cairo 1.12.14, with Pango 1.34.1, with
GLib 2.36.3, with libpcap, with libz 1.2.8, with POSIX capabilities (Linux),
with libnl 3, without SMI, without c-ares, without ADNS, with Lua 5.1, without
Python, with GnuTLS 3.2.2, with Gcrypt 1.5.2, with MIT Kerberos, without GeoIP,
without PortAudio, without AirPcap.
Running on Linux 3.10.3-1-ARCH, with locale en_US.UTF-8, with libpcap version
1.4.0, with libz 1.2.8, GnuTLS 3.2.2, Gcrypt 1.5.2.
AMD Athlon(tm) II Neo K125 Processor
Built using gcc 4.8.1.
--
When attempting to compile a dissector plugin (running make -C plugins from the
top level folder) the build fails with the following error:
$ make -C plugins/
make: Entering directory `/home/paul/src/wireshark-1.10.1/plugins'
Making all in hdhr
make[1]: Entering directory `/home/paul/src/wireshark-1.10.1/plugins/hdhr'
Making plugin.c with python
Traceback (most recent call last):
File "../../tools/make-dissector-reg.py", line 288, in <module>
new_hash = hashlib.sha1(reg_code).hexdigest()
TypeError: Unicode-objects must be encoded before hashing
make[1]: *** [plugin.c] Error 1
Additional Information:
$ /usr/bin/env python -V
Python 3.3.2
The hashlib functions expect a bytes object, but a string is being passed.
Modifying the line to the following resolves the problem...
new_hash = hashlib.sha1(bytes(reg_code, "UTF-8")).hexdigest()
You are receiving this mail because:
- You are watching all bug changes.