summaryrefslogtreecommitdiffstats
path: root/Lib/gopherlib.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/gopherlib.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/gopherlib.py')
-rw-r--r--Lib/gopherlib.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/Lib/gopherlib.py b/Lib/gopherlib.py
index e91ef99..033e579 100644
--- a/Lib/gopherlib.py
+++ b/Lib/gopherlib.py
@@ -77,19 +77,20 @@ def send_query(selector, query, host, port = 0):
# Takes a path as returned by urlparse and returns the appropriate selector
def path_to_selector(path):
- if path=="/":
- return "/"
- else:
- return path[2:] # Cuts initial slash and data type identifier
+ if path=="/":
+ return "/"
+ else:
+ return path[2:] # Cuts initial slash and data type identifier
# Takes a path as returned by urlparse and maps it to a string
# See section 3.4 of RFC 1738 for details
def path_to_datatype_name(path):
- if path=="/":
- return "TYPE='unknown'" # No way to tell, although "INDEX" is probable
- else:
- return type_to_name(path[1])
-
+ if path=="/":
+ # No way to tell, although "INDEX" is likely
+ return "TYPE='unknown'"
+ else:
+ return type_to_name(path[1])
+
# The following functions interpret the data returned by the gopher
# server according to the expected type, e.g. textfile or directory
@@ -118,7 +119,8 @@ def get_directory(f):
continue
if len(parts) > 4:
if parts[4:] != ['+']:
- print '(Extra info from server:', parts[4:], ')'
+ print '(Extra info from server:',
+ print parts[4:], ')'
else:
parts.append('')
parts.insert(0, gtype)