From: <Z3...@us...> - 2010-09-04 21:52:50
|
Revision: 298 http://spd.svn.sourceforge.net/spd/?rev=298&view=rev Author: Z3po Date: 2010-09-04 21:52:44 +0000 (Sat, 04 Sep 2010) Log Message: ----------- fixed bugs in --add functionality Modified Paths: -------------- trunk/src/spd-cli trunk/src/spdCLI.py trunk/src/spdCore.py Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2010-06-28 11:33:34 UTC (rev 297) +++ trunk/src/spd-cli 2010-09-04 21:52:44 UTC (rev 298) @@ -43,7 +43,7 @@ parser.add_option( "-e", "--edit", metavar="ID", dest ="edit", - help ="Entry to edit") + help ="ID to edit") parser.add_option( "-i", "--delete-id", metavar="ID", @@ -52,9 +52,8 @@ parser.add_option( "--id", dest ="id", - help ="Search Password by ID") + help ="Show Password by ID") - parser.add_option( "-a", "--add", action="store_true", dest = "add", @@ -102,7 +101,7 @@ pc.addEntry(interface.newEntry(pc.getCollumns())) pc.exportPasswordsPlain() -if options.edit: +elif options.edit: updates = interface.editEntry(pc.findPassword(options.edit,id=True)) pc.updateEntry(updates) pc.exportPasswordsPlain() Modified: trunk/src/spdCLI.py =================================================================== --- trunk/src/spdCLI.py 2010-06-28 11:33:34 UTC (rev 297) +++ trunk/src/spdCLI.py 2010-09-04 21:52:44 UTC (rev 298) @@ -161,7 +161,6 @@ return table # }}} - def setConfig(self,var,value): # {{{ self.config[var] = value # }}} @@ -174,7 +173,6 @@ entry = {} for i in collumns: entry[i] = raw_input(i + ': ') - return entry # }}} Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2010-06-28 11:33:34 UTC (rev 297) +++ trunk/src/spdCore.py 2010-09-04 21:52:44 UTC (rev 298) @@ -209,7 +209,7 @@ count=0 for collumns in self.__table: # now we are writing the data count += 1 - if not self.__table[collumns][1]: + if not self.__table[collumns][i]: fobj.write('') # <- here else: fobj.write(self.__table[collumns][i]) # <- and here @@ -289,7 +289,6 @@ result = { "ID" : []} else: - result = {} if (output != "noID" ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |