FreeBSD Bugzilla – Attachment 134431 Details for
Bug 179100
Add missing type for net/py-txamqp codec
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.70 KB, created by
horus.li
on 2013-05-30 07:40:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
horus.li
Created:
2013-05-30 07:40:00 UTC
Size:
1.70 KB
patch
obsolete
>diff -ruN py-txamqp.orig/Makefile py-txamqp/Makefile >--- py-txamqp.orig/Makefile 2013-05-12 12:52:39.000000000 +0800 >+++ py-txamqp/Makefile 2013-05-30 14:03:46.000000000 +0800 >@@ -28,7 +28,7 @@ > # TODO: Install txAMQP examples. > > # Don't try to install Twisted yourself, txAMQP. thx! >-do-patch: >+post-patch: > @${REINPLACE_CMD} -e '/install_requires/s/^/#/' ${WRKSRC}/setup.py > > .include <bsd.port.mk> >diff -ruN py-txamqp.orig/files/patch-src__txamqp__codec.py py-txamqp/files/patch-src__txamqp__codec.py >--- py-txamqp.orig/files/patch-src__txamqp__codec.py 1970-01-01 08:00:00.000000000 +0800 >+++ py-txamqp/files/patch-src__txamqp__codec.py 2013-05-30 13:55:04.000000000 +0800 >@@ -0,0 +1,42 @@ >+--- ./src/txamqp/codec.py.orig 2009-08-16 19:25:45.000000000 +0800 >++++ ./src/txamqp/codec.py 2013-05-30 13:54:50.000000000 +0800 >+@@ -25,12 +25,12 @@ >+ """ >+ >+ from cStringIO import StringIO >+-from struct import * >++from struct import pack, calcsize, unpack >+ >+ class EOF(Exception): >+ pass >+ >+-class Codec: >++class Codec(object): >+ >+ def __init__(self, stream): >+ self.stream = stream >+@@ -153,6 +153,13 @@ >+ def decode_longstr(self): >+ return self.dec_str("!L") >+ >++ # timestamp >++ def encode_timestamp(self, o): >++ self.pack("!Q", o) >++ >++ def decode_timestamp(self): >++ return self.unpack("!Q") >++ >+ # table >+ def encode_table(self, tbl): >+ enc = StringIO() >+@@ -180,6 +187,10 @@ >+ value = self.decode_longstr() >+ elif type == "I": >+ value = self.decode_long() >++ elif type == "F": >++ value = self.decode_table() >++ elif type == "t": >++ value = (self.decode_octet() != 0) >+ else: >+ raise ValueError(repr(type)) >+ result[key] = value
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 179100
: 134431