From b7c1e02ede5b9e5b6fa6f2199b5991e9b063a534 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Mon, 3 Dec 2012 13:50:24 -0500 Subject: [PATCH] gcal-bot: Remove .humbug-api-key reading This behavior is part of api/humbug.py now. (imported from commit 8a9722c8ad05391160cbb98387f34ef9924d81de) --- bots/gcal-bot | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/bots/gcal-bot b/bots/gcal-bot index 4e8a437..889392b 100755 --- a/bots/gcal-bot +++ b/bots/gcal-bot @@ -17,7 +17,6 @@ parser = optparse.OptionParser(r""" %prog \ --user foo@humbughq.com \ - --api-key 0123456789abcdef0123456789abcdef \ --calendar http://www.google.com/calendar/feeds/foo%40humbughq.com/private-fedcba9876543210fedcba9876543210/basic Send yourself reminders on Humbug of Google Calendar events. @@ -64,16 +63,8 @@ parser.add_option('--interval', (options, args) = parser.parse_args() -if not options.api_key: - try: - with open(path.join(os.environ['HOME'], '.humbug-api-key'), 'r') as f: - options.api_key = f.read().strip() - except IOError as e: - if e.errno != errno.ENOENT: - raise - -if not (options.user and options.api_key and options.calendar): - parser.error('You must specify --user, --api-key, and --calendar') +if not (options.user and options.calendar): + parser.error('You must specify --user and --calendar') try: from gdata.calendar.client import CalendarClient