Open gthieleb opened 7 years ago
Thank you for the report. Could you provide more context? In particular, can you pinpoint what file in your project causes this issue? Could you attach that file here?
TypeError raises for example with this small snippet:
#!/usr/bin/env python
import os
from pwd import getpwuid
import sys
def print_cmds(rootpath):
for root, dirs, files in os.walk(rootpath):
for base in (dirs + files):
path = os.path.join(root, base)
print "echo chown %s:%s %s" % (get_ownership(path)[0], get_ownership(path)[1], path)
print "echo chmod %s %s" % (get_permissions(path), path)
def get_permissions(path):
return oct(os.stat(path).st_mode & 0777)
def get_ownership(path):
return os.stat(path).st_uid, os.stat(path).st_gid
if __name__ == '__main__':
print_cmds(sys.argv[1])
~
Solved with my PR https://github.com/mkwiatkowski/pythoscope/pull/14 (or my branch) which uses six instead of lib2to3