Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix "end of line" bugs #35

Closed
yuanchun-li opened this issue Feb 23, 2017 · 2 comments
Closed

fix "end of line" bugs #35

yuanchun-li opened this issue Feb 23, 2017 · 2 comments
Labels

Comments

@yuanchun-li
Copy link
Collaborator

Windows and Unix have different end of line characters (\r\n in Window and \n in Unix).
I saw some methods didn't consider such difference. For example, in view_client.py we had:

def validServerResponse(self, response):
        """
        Checks the response received from the I{ViewServer}.

        @return: C{True} if the response received matches L{PARCEL_TRUE}, C{False} otherwise
        """
        PARCEL_TRUE = "Result: Parcel(00000000 00000001   '........')\r\n"
        ''' The TRUE response parcel '''
        return response == PARCEL_TRUE

It should be something like this:

def validServerResponse(self, response):
        """
        Checks the response received from the I{ViewServer}.

        @return: C{True} if the response received matches L{PARCEL_TRUE}, C{False} otherwise
        """
        PARCEL_TRUE = "Result: Parcel(00000000 00000001   '........')"
        ''' The TRUE response parcel '''
        return response.strip() == PARCEL_TRUE

I think there are more such errors. I'll try to fix them soon.

@rupak0577
Copy link

Looks like only view_client.py has this issue

@yuanchun-li
Copy link
Collaborator Author

Seems it work well on Windows now,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants