diff options
-rwxr-xr-x | saucypy | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6,7 +6,7 @@ import optparse import shlex import sys -VERSION = "1.0.3" +VERSION = "1.0.4" ENTRIES_FILE = "saucypy.json" @@ -38,13 +38,13 @@ def main(): if options.add: key, value = options.add - entries[key] = value matches = find( key, entries ) if len( matches ) > 1: exact_match = list(filter( lambda x: x == key, matches)) if exact_match: print ("There is already an item named " + key) else: + entries[key] = value json.dump( entries, open( ENTRIES_FILE, "w" ), indent = 4, sort_keys = True ) print (key + ": " + value + " added") elif options.count: |