mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Ran 2to3 over scripts directory.
This commit is contained in:
parent
d11ae5d6ec
commit
8efadf5d66
19 changed files with 74 additions and 86 deletions
|
@ -46,19 +46,19 @@ def main():
|
|||
magic_str = f.read(4)
|
||||
mtime_str = f.read(4)
|
||||
f.close()
|
||||
if magic_str <> MAGIC:
|
||||
if magic_str != MAGIC:
|
||||
print('Bad MAGIC word in ".pyc" file', end=' ')
|
||||
print(repr(name_c))
|
||||
continue
|
||||
mtime = get_long(mtime_str)
|
||||
if mtime == 0 or mtime == -1:
|
||||
print('Bad ".pyc" file', repr(name_c))
|
||||
elif mtime <> st[ST_MTIME]:
|
||||
elif mtime != st[ST_MTIME]:
|
||||
print('Out-of-date ".pyc" file', end=' ')
|
||||
print(repr(name_c))
|
||||
|
||||
def get_long(s):
|
||||
if len(s) <> 4:
|
||||
if len(s) != 4:
|
||||
return -1
|
||||
return ord(s[0]) + (ord(s[1])<<8) + (ord(s[2])<<16) + (ord(s[3])<<24)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue