[Twisted-Python] [PATCH] nasty bug in twisted.names.client.createResolver
The parameter variable 'hosts' gets overwritten by the import statement in createResolver. hosts.Resolver constructor is called with a module instead of a filename. - Ralf =================================================================== RCS file: /cvs/Twisted/twisted/names/client.py,v retrieving revision 1.45 diff -u -r1.45 client.py --- twisted/names/client.py 4 Feb 2004 19:55:34 -0000 1.45 +++ twisted/names/client.py 17 Feb 2004 01:01:53 -0000 @@ -303,20 +303,20 @@ return p -def createResolver(servers = None, resolvconf = None, hosts = None): +def createResolver(servers = None, resolvconf = None, hostsfile = None): import resolve, cache, hosts, root if platform.getType() == 'posix': if resolvconf is None: resolvconf = '/etc/resolv.conf' - if hosts is None: - hosts = '/etc/hosts' + if hostsfile is None: + hostsfile = '/etc/hosts' theResolver = Resolver(resolvconf, servers) - hostResolver = hosts.Resolver(hosts) + hostResolver = hosts.Resolver(hostsfile) else: - if hosts is None: - hosts = r'c:\windows\hosts' + if hostsfile is None: + hostsfile = r'c:\windows\hosts' bootstrap = ThreadedResolver() - hostResolver = hosts.Resolver(hosts) + hostResolver = hosts.Resolver(hostsfile) theResolver = root.bootstrap(bootstrap) L = [hostResolver, cache.CacheResolver(), theResolver] -- brainbot technologies ag boppstrasse 64 . 55118 mainz . germany fon +49 6131 211639-1 . fax +49 6131 211639-2 http://brainbot.com/ mailto:ralf@brainbot.com
On Mon, 2004-02-16 at 20:05, ralf@brainbot.com wrote:
The parameter variable 'hosts' gets overwritten by the import statement in createResolver. hosts.Resolver constructor is called with a module instead of a filename.
Please add patches and bugs to twistedmatrix.com/bugs/
Itamar Shtull-Trauring <itamar@itamarst.org> writes:
On Mon, 2004-02-16 at 20:05, ralf@brainbot.com wrote:
The parameter variable 'hosts' gets overwritten by the import statement in createResolver. hosts.Resolver constructor is called with a module instead of a filename.
Please add patches and bugs to twistedmatrix.com/bugs/
Lots of bug reports in the bug tracker have status 'unread'. That's not very motivating. Just committing this patch -even if it was wrong- would not make things worse, as the original code is definitely broken. But, I'll add it to the bugtracker tomorrow. - Ralf -- brainbot technologies ag boppstrasse 64 . 55118 mainz . germany fon +49 6131 211639-1 . fax +49 6131 211639-2 http://brainbot.com/ mailto:ralf@brainbot.com
On Tue, Feb 17, 2004, ralf@brainbot.com wrote:
Lots of bug reports in the bug tracker have status 'unread'.
That doesn't *necessarily* mean 'not read by the relevant developer'. It just means they haven't actually commented on the bug. This seems to be a feature/bug of the bugtrracker, roundup, itself. I've read all bugs assigned to me, but some of them are still 'unread' because I haven't felt the need to actually comment on them. -Mary
Mary Gardiner wrote:
On Tue, Feb 17, 2004, ralf@brainbot.com wrote:
Lots of bug reports in the bug tracker have status 'unread'.
That doesn't *necessarily* mean 'not read by the relevant developer'. It just means they haven't actually commented on the bug. This seems to be a feature/bug of the bugtrracker, roundup, itself.
I've read all bugs assigned to me, but some of them are still 'unread' because I haven't felt the need to actually comment on them.
-Mary
Just to confirm. In the default configuration of roundup the unread flag ONLY indicates that no-one has added a comment, or otherwise changed the status. Is has nothing to do at all with actually being read. -darryl -- http://randomthoughts.vandorp.ca/syncato/WK/blog
On Mon, 2004-02-16 at 21:20, ralf@brainbot.com wrote:
Lots of bug reports in the bug tracker have status 'unread'. That's not very motivating. Just committing this patch -even if it was wrong- would not make things worse, as the original code is definitely broken. But, I'll add it to the bugtracker tomorrow.
Let me put it this way: If it's in the bug tracker someone will eventually look at it. If you just post to list you can be pretty much sure no one will ever look at it again if they forget the first time. Please do post to the bug tracker. It won't make it go in fast, but it'll make sure the patch isn't *lost*.
participants (4)
-
darryl -
Itamar Shtull-Trauring -
Mary Gardiner -
ralf@brainbot.com