mirror of
https://github.com/python/cpython.git
synced 2025-09-23 17:03:23 +00:00
Whilespace normalization (reindint.py).
This commit is contained in:
parent
17a35f906c
commit
584b0e0c3d
31 changed files with 53 additions and 314 deletions
|
@ -58,7 +58,7 @@ __all__ = [
|
|||
# Exceptions
|
||||
'ResolutionError','VersionConflict','DistributionNotFound','UnknownExtra',
|
||||
'ExtractionError',
|
||||
|
||||
|
||||
# Parsing functions and string utilities
|
||||
'parse_requirements', 'parse_version', 'safe_name', 'safe_version',
|
||||
'get_platform', 'compatible_platforms', 'yield_lines', 'split_sections',
|
||||
|
@ -823,7 +823,7 @@ class ResourceManager:
|
|||
|
||||
old_exc = sys.exc_info()[1]
|
||||
cache_path = self.extraction_path or get_default_cache()
|
||||
|
||||
|
||||
err = ExtractionError("""Can't extract file(s) to egg cache
|
||||
|
||||
The following error occurred while trying to extract file(s) to the Python egg
|
||||
|
@ -878,7 +878,7 @@ variable to point to an accessible directory.
|
|||
ensure_directory(target_path)
|
||||
except:
|
||||
self.extraction_error()
|
||||
|
||||
|
||||
self.cached_files[target_path] = 1
|
||||
return target_path
|
||||
|
||||
|
@ -1264,11 +1264,11 @@ class ZipProvider(EggProvider):
|
|||
|
||||
try:
|
||||
rename(tmpnam, real_path)
|
||||
|
||||
except os.error:
|
||||
|
||||
except os.error:
|
||||
if os.path.isfile(real_path):
|
||||
stat = os.stat(real_path)
|
||||
|
||||
|
||||
if stat.st_size==size and stat.st_mtime==timestamp:
|
||||
# size and stamp match, somebody did it just ahead of
|
||||
# us, so we're done
|
||||
|
@ -2375,4 +2375,3 @@ run_main = run_script # backward compatibility
|
|||
# calling ``require()``) will get activated as well.
|
||||
add_activation_listener(lambda dist: dist.activate())
|
||||
working_set.entries=[]; map(working_set.add_entry,sys.path) # match order
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue