-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey all,
I was trying to setup tailor on windows to do a perforce->svn setup, and the error I was getting didn't make any sense. In p4lib.py, the windows command line that is passed to popen3 has every element (command and arg in argv) as single quoted. When you run the command in a windows cmd prompt, it looks like and returns this: - ---------- H:\erik>'p4.exe' '-c' 'tailor' '-p' 'localhost:1666' 'changes' '//local/web/eta.org/IWOJIMA/home/shaggy/public_html/...' ''p4.exe'' is not recognized as an internal or external command, operable program or batch file. - ---------- If I hack the _run method to look something like this, it gets by. - ---------- def _run(argv): """Prepare and run the given arg vector, 'argv', and return the results. Returns (<stdout lines>, <stderr lines>, <return value>). Note: 'argv' may also just be the command string. """ import subprocess if type(argv) in (types.ListType, types.TupleType): cmd = _joinArgv(argv) #<-------- maybe _joinArgv is bad? else: cmd = argv log.debug("Running '%s'..." % cmd) if sys.platform.startswith('win'): env = os.environ.copy() #<----------- making sure I'm not crazy cmd = cmd.replace("'","") #<--------- fixes and runs ok. p = subprocess.Popen(cmd, shell=True, env=env, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (i,o,e) = (p.stdin, p.stdout, p.stderr) - ---------- Is there a better way to fix this? I'm trying to open a trac issue, but it says my permissions are currently limited. Best regards, - -e -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) iEYEARECAAYFAkmY6hcACgkQayPhS8HwdlliTwCgrdFo53MWJHvcJwC+ZUtfHu1O 7NEAnA0ZFCQm0YVsckDeVHIldnOUeGUv =2Uqv -----END PGP SIGNATURE----- _______________________________________________ Tailor mailing list Tailor@lists.zooko.com http://lists.zooko.com/mailman/listinfo/tailor