pyDriveWire icon indicating copy to clipboard operation
pyDriveWire copied to clipboard

Indentation issue: dwcommand.py line 447

Open ReddyKilowatt opened this issue 6 years ago • 3 comments

Mike,

After I pulled the updates from github today, dwcommand.py has "unreachable code" on line 447. (this is the line number of the "unreachable code" in my editor. But when I look at offending line number in Github, it's completely different.

dwcommand_indentation_issue

It also looks like there's an indentation issue throughout the file. Didn't we have some indentation issues previously- when I first got involved with the project?

ReddyKilowatt avatar Jan 21 '20 02:01 ReddyKilowatt

I noticed the same.

BlairLeduc avatar Apr 18 '20 20:04 BlairLeduc

I did take a look at this and I was not able to reproduce it. Can you please tell me what git hash your repository is at currently? What operating system are you using?

n6il avatar Apr 18 '20 22:04 n6il

@n6il The problem here is that the raise re-throws the exception before the if statement can be reached. Removing the raise will output the error message intended by the if statement as demonstrated below.

pyDriveWire>  telnet
host ()
port (23)
{'msg': '\r\nFAIL [Errno 61] Connection refused', 'self.cmdClass': 'AT'}

digitalbytes avatar Jan 06 '21 02:01 digitalbytes