Skip to content

Conversation

@cloudtrends
Copy link
Contributor

Under windows environment the publicKeyPath and privateKeyPath should replace from \ to / when send them into injectkeys.py

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an isOnWindows() function in this class which can be reused

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi karuturi ,

thanks for your kindly help , yes , I should use the isOnWindows function .

ChunFeng

@karuturi
Copy link
Member

In case of windows, python scripts are executed and I think it runs fine from cygwin. Is this change targeted to make it work from cmd?

…m \ to / when send them into injectkeys.py , and use isOnWindows function . thanks karuturi kindly tips.
@cloudtrends
Copy link
Contributor Author

My test environment is on Windows 2008 & cygwin 64 bits version .

I can reoccur the error's by below python scripts:

--------------------------- cygwin_python_test.py -------------------
import os.path
import sys
file_name = sys.argv[1]
if os.path.exists(file_name):
print file_name
else:
print "can not find"
-------------------------------- end --------------------------

test it by , touch a file : F:/sourcecode/python/a-exist.txt

First test with Backslash :
$ python cygwin_python_test.py F:\sourcecode\python\a-exist.txt
can not find

Then with slash :

$ python cygwin_python_test.py F:/sourcecode/python/a-exist.txt
F:/sourcecode/python/a-exist.txt


So , I thinks we should change the backslash to slash in windows environment .

@cloudtrends
Copy link
Contributor Author

Hi karuturi ,

thanks for point out that I should use isOnWindows function , very appreciation.

ChunFeng

@karuturi
Copy link
Member

Thanks for the patch. Agree to the slash change. I am pushing this to master(4.6). Let me know if you want it on any other branch.

@asfgit asfgit closed this in 4c30636 Jan 16, 2015
asfgit pushed a commit that referenced this pull request Jan 16, 2015
…m \ to / when send them into injectkeys.py , and use isOnWindows function . thanks karuturi kindly tips.

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>

This closes #66
rohityadavcloud pushed a commit that referenced this pull request Jan 20, 2021
Fixes #46

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants