diff options
author | Joe Robinson <joe@lc8n.com> | 2020-12-01 11:21:35 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2020-12-01 11:21:35 +0000 |
commit | 45d1ed9f4d2088e5d7fa44450222f436fe095591 (patch) | |
tree | d7d1ec64cb2b80c181534e4eb4072ede9199f81e | |
parent | f3ef5e6f63baad99f61eef6c6d28eaba335263a9 (diff) |
Fix adding new items
-rwxr-xr-x | saucypy | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |