hikvision-tftpd icon indicating copy to clipboard operation
hikvision-tftpd copied to clipboard

Python3 Syntax Error

Open CanadianJeff opened this issue 7 years ago • 4 comments
trafficstars

root@APU2-SHAWSECURE:/tmp# python3 hiktest.py
  File "hiktest.py", line 65
    except hikvision_tftpd.Error, e:
                                ^
SyntaxError: invalid syntax

CanadianJeff avatar Feb 09 '18 23:02 CanadianJeff

root@APU2-SHAWSECURE:/tmp# python3 hiktftp.py
  File "hiktftp.py", line 49
    print 'Serving %d-byte %s (block size %d, %d blocks)' % (
                                                        ^
SyntaxError: invalid syntax

CanadianJeff avatar Feb 09 '18 23:02 CanadianJeff

Feel free to give commit 8d7dbb8 on the new python3 branch a try. Automated tests pass; I can't actually flash a device right now so not committing to master yet.

scottlamb avatar Aug 07 '18 02:08 scottlamb

Just confirming I tried this with python 3.11 and it worked. You're a life saver, thanks Scott.

00BlackRose00 avatar Aug 07 '23 12:08 00BlackRose00

Works great for Python3! Was doing my nut in till I searched through pulls/issues and found this.

callaa3 avatar Feb 09 '24 12:02 callaa3