Permalink
Browse files

fixed durable field to be enum value

  • Loading branch information...
rhs committed Aug 10, 2011
1 parent 53e71a3 commit 91dfa06d05a0384249dfe1b686861511a83aaf5a
Showing with 12 additions and 4 deletions.
  1. +1 −1 filerecv
  2. +1 −1 filesend
  3. +5 −1 recv
  4. +5 −1 send
View
@@ -49,7 +49,7 @@ opts, args = parser.parse_args()
if len(args) != 2:
parser.error("address and out dir is required")
-addr = Source(address=args[0], durable=True)
+addr = Source(address=args[0], durable=2)
host = opts.host or os.getenv('AMQP_BROKER') or "0.0.0.0"
conn = Connection(auth=opts.auth)
conn.tracing(*opts.trace.split())
View
@@ -47,7 +47,7 @@ opts, args = parser.parse_args()
if len(args) != 2:
parser.error("address and send dir is required")
-addr = Target(address=args[0], durable=True)
+addr = Target(address=args[0], durable=2)
host = opts.host or os.getenv('AMQP_BROKER') or "0.0.0.0"
conn = Connection(auth=opts.auth)
conn.tracing(*opts.trace.split())
View
6 recv
@@ -63,7 +63,11 @@ if opts.dynamic:
elif not args:
parser.error("address is required")
else:
- addr = Source(address=args[0], durable=opts.durable)
+ if opts.durable:
+ durable = 2
+ else:
+ durable = 0
+ addr = Source(address=args[0], durable=durable)
host = opts.host or os.getenv('AMQP_BROKER') or "0.0.0.0"
conn = Connection(auth=opts.auth)
View
6 send
@@ -63,7 +63,11 @@ if opts.dynamic:
elif not args:
parser.error("address is required")
else:
- addr = Target(address=args[0], durable=opts.durable)
+ if opts.durable:
+ durable = 2
+ else:
+ durable = 0
+ addr = Target(address=args[0], durable=durable)
host = opts.host or os.getenv('AMQP_BROKER') or "0.0.0.0"
conn = Connection(auth=opts.auth)

0 comments on commit 91dfa06

Please sign in to comment.