Skip to content

Commit

Permalink
Python 2 is not supported anymore
Browse files Browse the repository at this point in the history
Fixes issue bulletmark#11.
  • Loading branch information
bulletmark committed Mar 15, 2020
1 parent a95c8ce commit 72ebddf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
venv/
README.html
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $(DOC): $(SRC)

check:
flake8 $(PROG)
vermin -i -q $(PROG)
vermin --no-tips -i -q $(PROG)

install::
install -CD $(PROG) ~/bin
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ EDID.

## Installation

Requires python smbus module and edid-decode utility.
Requires python3 smbus module, and edid-decode utility.

Install these prerequisites on Debian/Ubuntu:

sudo apt-get install python-smbus edid-decode
sudo apt-get install python3-smbus edid-decode

Or, install these prerequisites on Arch:

Expand All @@ -29,7 +29,8 @@ Get this source code:
git clone https://github.com/bulletmark/edid-rw
cd edid-rw

This utility should run using python version 2.5+, or 3+.
This utility should run using Python version 3.2+. It does not work with
Python 2.

## Usage

Expand Down
7 changes: 4 additions & 3 deletions edid-rw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Program to read or write Extended Display Identification Data (EDID) to
a digital display. Default action is to READ binary EDID data from
Expand Down Expand Up @@ -104,8 +104,9 @@ def main():
if actsum != calsum:
if args.fix:
edid[x - 1] = calsum
sys.exit('%s checksum 0x%02x was BAD, rewrote it to '
'0x%02x.' % (blkname(b), actsum, calsum))
sys.stderr.write(
'%s checksum 0x%02x was BAD, rewrote it to '
'0x%02x.\n' % (blkname(b), actsum, calsum))
else:
sys.exit('ERROR: %s checksum 0x%02x is BAD, should be '
'0x%02x.' % (blkname(b), actsum, calsum))
Expand Down

0 comments on commit 72ebddf

Please sign in to comment.