uskudnik / amazon-glacier-cmd-interface

Command line interface for Amazon Glacier
MIT License
375 stars 103 forks source link

[PATCH] fix bookkeeping config handling #122

Closed lazyuser closed 11 years ago

lazyuser commented 11 years ago

args.bookkeeping was kept as string, not bool. bookkeeping local variable was not used anywhere. Please apply this patch:

diff --git a/glacier/glacier.py b/glacier/glacier.py
index 5c5f5df..e01c4b3 100755
--- a/glacier/glacier.py
+++ b/glacier/glacier.py
@@ -593,10 +593,9 @@ def main():
                        default=default("region"),
                        help="Region where you want to store \
                              your archives " + help_msg_config)
-    bookkeeping = True if default('bookkeeping') == 'True' else False
     group.add_argument('--bookkeeping',
                        required=False,
-                       default=default("bookkeeping"),
+                       default=(str(default('bookkeeping')).lower() == 'true'),
                        action="store_true",
                        help="Should we keep book of all created archives.\
                              This requires a Amazon SimpleDB account and its \