(self,opts)
return
Add an entry into the database
Add an entry into the database
Add an entry into the database
def _entry(self,opts):
        'Add an entry into the database'
        import getpass
        opts,args = self.ops['entry'].parse_args(opts)
        username = args[0]
        try:
            password = args[1]
        except:
            password1 = password2 = None
            while True:
                password1 = getpass.getpass()
                password2 = getpass.getpass()
                if password1 != password2: 
                    sys.stderr.write("Error: Your passwords didn't match\n")
                    continue
                break
            pass

        self.db.add_entry(opts.path,opts.title or username,username,password,
                          opts.url,opts.note,opts.imageid,opts.append)
        return
def _entry ( self , opts ) : import getpass opts , args = self . ops [ 'entry' ] . parse_args ( opts ) username = args [ 0 ] try : password = args [ 1 ] except : password1 = password2 = None while True : password1 = getpass . getpass ( ) password2 = getpass . getpass ( ) if password1 != password2 : sys . stderr . write ( "Error: Your passwords didn't match\n" ) continue break pass self . db . add_entry ( opts . path , opts . title or username , username , password , opts . url , opts . note , opts . imageid , opts . append ) return