Explorar el Código

Prettier archive contents listing

Jonas Borgström hace 14 años
padre
commit
00a98082ab
Se han modificado 2 ficheros con 5 adiciones y 2 borrados
  1. 5 1
      dedupestore/archive.py
  2. 0 1
      dedupestore/crypto.py

+ 5 - 1
dedupestore/archive.py

@@ -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()

+ 0 - 1
dedupestore/crypto.py

@@ -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: ')