Skip to content

In test.py, after giving input 1 (with space), run method initiate #63

Closed

Description

@shivangvijay

To replicate the issue:-

run the FRI as a server:

$ cd conore/fri
$ cd server
$ python3 main.py

and

$ cd ..
$ python3 test.py

when this code ask for input:- "methods - 1 for debug, 0 for run :"

Give input:- 1
This input not run debug, it initiate run method only.

Expected result:- Should initiate debug method as input is given 1.

Actual result:- It initiate run method.

More information:-
The problem is actually due to input treating as string, so space also matter. If user give input 1, test.py treat it as
" 1", which is not equal to "1". so the code goes on else condition and run method initiate.

method = input("methods - 1 for debug, 0 for run :")
if method == "1":
debug("sample-anyname", "xyz")
else:
run("sample-anyname", "xyz")

Activity

  1. pradeeban commented on Mar 15, 2023

    @pradeeban
    Member

    Thanks for the catch, @shivangvijay. I have merged your PR.

  2. pradeeban commented on Mar 15, 2023

    @pradeeban
    Member

    Fixed in #61.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions