Преглед на файлове

change-password improvements

Jonas Borgström преди 13 години
родител
ревизия
fbdc11e166
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      darc/archiver.py

+ 4 - 4
darc/archiver.py

@@ -56,11 +56,11 @@ class Archiver(object):
 
 
     def do_chpasswd(self, args):
     def do_chpasswd(self, args):
         if os.path.isfile(args.store_or_file):
         if os.path.isfile(args.store_or_file):
-            filename = args.store_or_file
+            key = Key()
+            key.open(args.store_or_file)
         else:
         else:
-            filename = Location(args.store_or_file).to_key_filename()
-        key = Key()
-        key.open(filename)
+            store = self.open_store(Location(args.store_or_file))
+            key = Key(store)
         key.chpasswd()
         key.chpasswd()
         print 'Key file "%s" updated' % key.path
         print 'Key file "%s" updated' % key.path
         return self.exit_code
         return self.exit_code