Skip to content

Commit

Permalink
Fix SyntaxWarning: "is" with a literal.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmpilato committed May 18, 2020
1 parent a0f7e94 commit 4a0240d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/viewvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1723,8 +1723,8 @@ def detect_encoding(text_block):
resp = chardet.detect(text_block)
if resp.get('confidence') == 1.0:
encoding = resp.get('encoding')
if encoding is "ascii":
encoding = "utf-8"
if encoding == 'ascii':
encoding = 'utf-8'
return encoding
except:
pass
Expand Down

0 comments on commit 4a0240d

Please sign in to comment.