support python 3
This commit is contained in:
parent
153f7dd0b4
commit
062f9ea5dd
8
unbox
8
unbox
|
@ -27,8 +27,8 @@ def usage(err=None):
|
||||||
retval = 0
|
retval = 0
|
||||||
if err:
|
if err:
|
||||||
retval = 1
|
retval = 1
|
||||||
print 'error: %s' % err
|
print('error: %s' % err)
|
||||||
print 'usage: unbox ARCHIVE'
|
print('usage: unbox ARCHIVE')
|
||||||
sys.exit(retval)
|
sys.exit(retval)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -56,7 +56,7 @@ if __name__ == "__main__":
|
||||||
os.close(fd)
|
os.close(fd)
|
||||||
|
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
print d
|
print(d)
|
||||||
os.chdir(d)
|
os.chdir(d)
|
||||||
|
|
||||||
base2 = os.path.basename(path2)
|
base2 = os.path.basename(path2)
|
||||||
|
@ -66,7 +66,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
retcode = call(cmd)
|
retcode = call(cmd)
|
||||||
if retcode != 0:
|
if retcode != 0:
|
||||||
print 'error: %s failed (%d)' % (cmd[0], retcode)
|
print('error: %s failed (%d)' % (cmd[0], retcode))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
os.unlink(path2)
|
os.unlink(path2)
|
||||||
|
|
Loading…
Reference in New Issue