[MERGE][#107155] _get_vendor_by_inspection incorrectly determines "plink" to be the executable

Alexander Belchenko bialix at ukr.net
Sun Sep 2 09:38:37 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Albisetti пишет:
> I ran into a user who could reproduce bug #107155, so I cooked up a
> patch, sent it to him, and he confirmed that this patch fixes his
> problem.
> 
> For some reason, Windows sometimes reports "plink" is available when
> it's not, so I'm testing to make sure that the "plink" version is
> coming from "plink -V" and not "ssh -V" (or any other in the future).
> 
> If this goes in, it should close bug #107155.
> 
> I'm not a super python guru, so the approach might not be the most
> appropriate, I'll be glad to rewrite it if it's necessary and some can
> give me some guidance.

=== modified file 'bzrlib/transport/ssh.py'
- --- bzrlib/transport/ssh.py	2007-05-12 19:05:12 +0000
+++ bzrlib/transport/ssh.py	2007-08-30 20:19:54 +0000
@@ -114,10 +114,11 @@
             stdout = stderr = ''
         return stdout + stderr

- -    def _get_vendor_by_version_string(self, version):
+    def _get_vendor_by_version_string(self, version, arg):
         """Return the vendor or None based on output from the subprocess.

         :param version: The output of 'ssh -V' like command.
+        :param arg: Argument executed.
         """
         vendor = None
         if 'OpenSSH' in version:

^-- arg is really bad name here.
and
+        :param arg: Argument executed.
too. Actually executed command or command line, "argument" looks slightly odd.
Better to change this param to "args" as Martin Pool suggested, or "cmd_line".

bb:tweak


- --
[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG2naNzYr338mxwCURAr8WAKCA1Qww+k1fqkAXV+HF4HpTVu/3bQCfb7TM
5Y1mN5mAZLr3ZIg2h3AXuUg=
=kJqp
-----END PGP SIGNATURE-----



More information about the bazaar mailing list