Commit 599c4f7f authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #644 from stepshal/spacing-comment-hash

Fix spacing after comment hash.
parents 7303c328 93612718
...@@ -325,7 +325,7 @@ class PackageIndex(Environment): ...@@ -325,7 +325,7 @@ class PackageIndex(Environment):
base = f.url # handle redirects base = f.url # handle redirects
page = f.read() page = f.read()
if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. if not isinstance(page, str): # We are in Python 3 and got bytes. We want str.
if isinstance(f, urllib.error.HTTPError): if isinstance(f, urllib.error.HTTPError):
# Errors have no charset, assume latin1: # Errors have no charset, assume latin1:
charset = 'latin-1' charset = 'latin-1'
......
...@@ -29,7 +29,7 @@ except ImportError: ...@@ -29,7 +29,7 @@ except ImportError:
""" """
def __init__(self): def __init__(self):
self.name = None # Handle mkdtemp raising an exception self.name = None # Handle mkdtemp raising an exception
self.name = tempfile.mkdtemp() self.name = tempfile.mkdtemp()
def __enter__(self): def __enter__(self):
...@@ -38,7 +38,7 @@ except ImportError: ...@@ -38,7 +38,7 @@ except ImportError:
def __exit__(self, exctype, excvalue, exctrace): def __exit__(self, exctype, excvalue, exctrace):
try: try:
shutil.rmtree(self.name, True) shutil.rmtree(self.name, True)
except OSError: #removal errors are not the only possible except OSError: # removal errors are not the only possible
pass pass
self.name = None self.name = None
......
...@@ -23,7 +23,7 @@ def __boot(): ...@@ -23,7 +23,7 @@ def __boot():
break break
else: else:
try: try:
import imp # Avoid import loop in Python >= 3.3 import imp # Avoid import loop in Python >= 3.3
stream, path, descr = imp.find_module('site', [item]) stream, path, descr = imp.find_module('site', [item])
except ImportError: except ImportError:
continue continue
...@@ -38,7 +38,7 @@ def __boot(): ...@@ -38,7 +38,7 @@ def __boot():
else: else:
raise ImportError("Couldn't find the real 'site' module") raise ImportError("Couldn't find the real 'site' module")
known_paths = dict([(makepath(item)[1], 1) for item in sys.path]) # 2.2 comp known_paths = dict([(makepath(item)[1], 1) for item in sys.path]) # 2.2 comp
oldpos = getattr(sys, '__egginsert', 0) # save old insertion position oldpos = getattr(sys, '__egginsert', 0) # save old insertion position
sys.__egginsert = 0 # and reset the current one sys.__egginsert = 0 # and reset the current one
......
...@@ -25,8 +25,8 @@ class TestDistInfo: ...@@ -25,8 +25,8 @@ class TestDistInfo:
unversioned = dists['UnversionedDistribution'] unversioned = dists['UnversionedDistribution']
versioned = dists['VersionedDistribution'] versioned = dists['VersionedDistribution']
assert versioned.version == '2.718' # from filename assert versioned.version == '2.718' # from filename
assert unversioned.version == '0.3' # from METADATA assert unversioned.version == '0.3' # from METADATA
def test_conditional_dependencies(self): def test_conditional_dependencies(self):
specs = 'splort==4', 'quux>=1.1' specs = 'splort==4', 'quux>=1.1'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment