Skip to content

Commit

Permalink
build-server: Fix Codacy issues
Browse files Browse the repository at this point in the history
- Don't `import sys` twice
- Don't redefine a builtin (`max`)
  • Loading branch information
ferdnyc committed Jul 23, 2020
1 parent c7a22d8 commit 5b2269a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions installer/build-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import re
import stat
import subprocess
import sys
import tinys3
import time
import traceback
Expand Down Expand Up @@ -100,12 +99,12 @@ def error(line):
log.write(line)


def truncate(message, max=256):
def truncate(message, maxlen=256):
"""Truncate the message with ellipses"""
if len(message) < max:
if len(message) < maxlen:
return message
else:
return "%s..." % message[:max]
return "%s..." % message[:maxlen]


def zulip_upload_log(log, title, comment=None):
Expand Down

0 comments on commit 5b2269a

Please sign in to comment.