Update sympy/polys/polytools.py

 It was giving an error when an integer was passed as an argument to the function, I didn't check for that and also didn't run the test code. I manually checked for some cases and it was working. From this time I'll make sure to run all test codes locally before committing.