diff --git a/darc/archive.py b/darc/archive.py index 904408a2b..dd7c1add6 100644 --- a/darc/archive.py +++ b/darc/archive.py @@ -14,7 +14,7 @@ from .helpers import uid2user, user2uid, gid2group, group2gid, IntegrityError CHUNK_SIZE = 55001 have_lchmod = hasattr(os, 'lchmod') -linux = sys.platform == 'linux' +linux = sys.platform == 'linux2' class Archive(object): diff --git a/darc/archiver.py b/darc/archiver.py index 159b009cc..d2b965424 100644 --- a/darc/archiver.py +++ b/darc/archiver.py @@ -50,6 +50,7 @@ class Archiver(object): cache = Cache(store, keychain) for path in args.paths: for path, st in walk_dir(unicode(path)): + self.print_verbose(path) if stat.S_ISDIR(st.st_mode): archive.process_dir(path, st) elif stat.S_ISLNK(st.st_mode): diff --git a/darc/keychain.py b/darc/keychain.py index b525b7bd8..7e6f040cf 100644 --- a/darc/keychain.py +++ b/darc/keychain.py @@ -37,12 +37,12 @@ class Keychain(object): raise ValueError('Not a keychain') cdata = fd.read() self.password = '' - data = self._decrypt(cdata, '') + data = self.decrypt_keychain(cdata, '') while not data: self.password = getpass('Keychain password: ') if not self.password: raise Exception('Keychain decryption failed') - data = self.decrypt(cdata, self.password) + data = self.decrypt_keychain(cdata, self.password) if not data: print 'Incorrect password' chain = msgpack.unpackb(data) @@ -71,7 +71,7 @@ class Keychain(object): } return msgpack.packb(d) - def _decrypt(self, data, password): + def decrypt_keychain(self, data, password): d = msgpack.unpackb(data) assert d['version'] == 1 assert d['algorithm'] == 'SHA256'