summaryrefslogtreecommitdiffstats
path: root/Lib/quopri.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-03-26 20:56:10 (GMT)
committerGuido van Rossum <guido@python.org>1998-03-26 20:56:10 (GMT)
commit8ca842066c947179892d50bf17b57943e7e5cd6b (patch)
tree36f095712bb110abdb9d129e8a59a09e4ce8d087 /Lib/quopri.py
parentfa6e254b34b7a0f85cb34a9fd99b5a6400714940 (diff)
downloadcpython-8ca842066c947179892d50bf17b57943e7e5cd6b.zip
cpython-8ca842066c947179892d50bf17b57943e7e5cd6b.tar.gz
cpython-8ca842066c947179892d50bf17b57943e7e5cd6b.tar.bz2
A few lines were indented using spaces instead of tabs -- fix them.
Diffstat (limited to 'Lib/quopri.py')
-rwxr-xr-xLib/quopri.py56
1 files changed, 28 insertions, 28 deletions
diff --git a/Lib/quopri.py b/Lib/quopri.py
index e8e8397..6b45597 100755
--- a/Lib/quopri.py
+++ b/Lib/quopri.py
@@ -93,43 +93,43 @@ def test():
import sys
import getopt
try:
- opts, args = getopt.getopt(sys.argv[1:], 'td')
+ opts, args = getopt.getopt(sys.argv[1:], 'td')
except getopt.error, msg:
- sys.stdout = sys.stderr
- print msg
- print "usage: quopri [-t | -d] [file] ..."
- print "-t: quote tabs"
- print "-d: decode; default encode"
- sys.exit(2)
+ sys.stdout = sys.stderr
+ print msg
+ print "usage: quopri [-t | -d] [file] ..."
+ print "-t: quote tabs"
+ print "-d: decode; default encode"
+ sys.exit(2)
deco = 0
tabs = 0
for o, a in opts:
- if o == '-t': tabs = 1
- if o == '-d': deco = 1
+ if o == '-t': tabs = 1
+ if o == '-d': deco = 1
if tabs and deco:
- sys.stdout = sys.stderr
- print "-t and -d are mutually exclusive"
- sys.exit(2)
+ sys.stdout = sys.stderr
+ print "-t and -d are mutually exclusive"
+ sys.exit(2)
if not args: args = ['-']
sts = 0
for file in args:
- if file == '-':
- fp = sys.stdin
- else:
- try:
- fp = open(file)
- except IOError, msg:
- sys.stderr.write("%s: can't open (%s)\n" % (file, msg))
- sts = 1
- continue
- if deco:
- decode(fp, sys.stdout)
- else:
- encode(fp, sys.stdout, tabs)
- if fp is not sys.stdin:
- fp.close()
+ if file == '-':
+ fp = sys.stdin
+ else:
+ try:
+ fp = open(file)
+ except IOError, msg:
+ sys.stderr.write("%s: can't open (%s)\n" % (file, msg))
+ sts = 1
+ continue
+ if deco:
+ decode(fp, sys.stdout)
+ else:
+ encode(fp, sys.stdout, tabs)
+ if fp is not sys.stdin:
+ fp.close()
if sts:
- sys.exit(sts)
+ sys.exit(sts)
if __name__ == '__main__':
test()