Prettier archive contents listing

This commit is contained in:
Jonas Borgström 2010-10-25 20:38:15 +02:00
parent be469ba8c4
commit 00a98082ab
2 changed files with 5 additions and 2 deletions

View file

@ -92,7 +92,11 @@ class Archive(object):
def list(self):
self.get_items()
for item in self.items:
print item['path']
mode = str(item['mode'])
size = item.get('size', 0)
mtime = datetime.fromtimestamp(item['mtime'])
print '%s %-6s %-6s %8d %s %s' % (mode, item['user'], item['group'],
size, mtime, item['path'])
def extract(self, dest=None):
self.get_items()

View file

@ -93,7 +93,6 @@ class KeyChain(object):
return 0
def chpass(self):
self.rsa_read = self.rsa_read.publickey()
password, password2 = 1, 2
while password != password2:
password = getpass('New password: ')