Rev 1243: Use property rather than function for busy data. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4/
Jelmer Vernooij
jelmer at samba.org
Thu Jun 19 15:06:38 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.4/
------------------------------------------------------------
revno: 1243
revision-id: jelmer at samba.org-20080619140637-nxobzdjoac3l6rkx
parent: jelmer at samba.org-20080619135842-8kg5be1na8cgdptp
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Thu 2008-06-19 16:06:37 +0200
message:
Use property rather than function for busy data.
modified:
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
ra.py ra.py-20080615005305-t5221niknu8rm6bt-1
transport.py transport.py-20060406231150-b3472d06b3a0818d
=== modified file 'fetch.py'
--- a/fetch.py 2008-06-19 13:58:42 +0000
+++ b/fetch.py 2008-06-19 14:06:37 +0000
@@ -683,7 +683,7 @@
reporter.finish()
finally:
if conn is not None:
- if not conn.is_busy():
+ if not conn.busy:
self.source.transport.add_connection(conn)
except:
editor.abort()
=== modified file 'ra.py'
--- a/ra.py 2008-06-19 13:58:42 +0000
+++ b/ra.py 2008-06-19 14:06:37 +0000
@@ -315,6 +315,8 @@
def is_busy(self):
return self._busy
+
+ busy = property(is_busy)
def _mark_busy(self):
assert not self._busy, "already busy"
=== modified file 'transport.py'
--- a/transport.py 2008-06-17 21:03:10 +0000
+++ b/transport.py 2008-06-19 14:06:37 +0000
@@ -82,7 +82,7 @@
def get(self, url):
# Check if there is an existing connection we can use
for c in self.connections:
- assert not c.is_busy(), "busy connection in pool"
+ assert not c.busy, "busy connection in pool"
if c.url == url:
self.connections.remove(c)
return c
@@ -101,7 +101,7 @@
raise
def add(self, connection):
- assert not connection.is_busy(), "adding busy connection in pool"
+ assert not connection.busy, "adding busy connection in pool"
self.connections.add(connection)
More information about the bazaar-commits
mailing list