diff --git a/citoyen.py b/citoyen.py index e10b480..6fc25e0 100755 --- a/citoyen.py +++ b/citoyen.py @@ -212,7 +212,7 @@ def main(): parserdump.add_argument("-o", "--output", dest='calendar', required=True, default='cal.ics', help="Output calendar file.") args = parser.parse_args() - logger.info("Initial arguments: %s" % args) + logger.debug("Initial arguments: %s" % args) if args.debug: logger.info('Setting logging to debug mode') @@ -236,8 +236,12 @@ def main(): args.login = config.get('Login','login') if 'password' in options: args.password = config.get('Login','password') + if 'Espace' in sections: + options = config.options('Espace') + if 'ville' in options: + args.city = config.get('Espace', 'ville') - logger.info("Final arguments: %s" % args) + logger.debug("Final arguments: %s" % args) if args.city == None: logger.info('City must be provided.') @@ -271,6 +275,7 @@ def main(): resaNum+=1 elif (args.command == 'D'): resaType = list(resaTypes)[args.index-1] + logger.info('Retrieve reservations for "%s"' % resaType) url = resaTypes[resaType] dumpReservation(resaType, baseURL, args.city, url, cookies, args.calendar)