Skip to content

Commit 241f6cc

Browse files
committed
---
yaml --- r: 534 b: refs/heads/master c: 724d723 h: refs/heads/master v: v3
1 parent 041397f commit 241f6cc

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 828afaa2fa4cc9e3e53bda0ae3073abfcfa151ca
2+
refs/heads/master: 724d7235e546fb79009800700fd74328f8171b8c

trunk/src/etc/tidy.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
#!/usr/bin/python
22

3-
import sys, fileinput, subprocess
3+
import sys, fileinput
44

55
err=0
66
cols=78
77

8-
try:
9-
result=subprocess.check_output([ "git", "config", "core.autocrlf" ])
10-
autocrlf=result.strip() == b"true"
11-
except CalledProcessError:
12-
autocrlf=False
13-
148
def report_err(s):
159
global err
1610
print("%s:%d: %s" % (fileinput.filename(), fileinput.filelineno(), s))
@@ -20,11 +14,10 @@ def report_err(s):
2014
if line.find('\t') != -1 and fileinput.filename().find("Makefile") == -1:
2115
report_err("tab character")
2216

23-
if not autocrlf and line.find('\r') != -1:
17+
if line.find('\r') != -1:
2418
report_err("CR character")
2519

26-
line_len = len(line)-2 if autocrlf else len(line)-1
27-
if line_len > cols:
20+
if len(line)-1 > cols:
2821
report_err("line longer than %d chars" % cols)
2922

3023

0 commit comments

Comments
 (0)