def verify_month_inputs(month_date):
 (year, month) = month_date.split('-')
 (year, month) = (int(year), int(month))
 missing = []
 for day in xrange(1, (calendar.monthrange(year, month)[1] + 1)):
  for hour in xrange(24):
   hour_date = ('%04d-%02d-%02d-%02d' % (year, month, day, hour))
   log_path = os.path.join(RAW_LOG_DIR, ('%s.log.gz' % hour_date))
   if (not s3_key_exists(s3_connection, log_path)):
    log_path = os.path.join(RAW_LOG_DIR, ('%s.log.bz2' % hour_date))
    if (not s3_key_exists(s3_connection, log_path)):
     missing.append(hour_date)
 for d in missing:
  print d

def verify_month_inputs ( month_date ) : ( year , month ) = month_date . split ( '-' ) ( year , month ) = ( int ( year ) , int ( month ) ) missing = [ ] for day in xrange ( 1 , ( calendar . monthrange ( year , month ) [ 1 ] + 1 ) ) : for hour in xrange ( 24 ) : hour_date = ( '%04d-%02d-%02d-%02d' % ( year , month , day , hour ) ) log_path = os . path . join ( RAW_LOG_DIR , ( '%s.log.gz' % hour_date ) ) if ( not s3_key_exists ( s3_connection , log_path ) ) : log_path = os . path . join ( RAW_LOG_DIR , ( '%s.log.bz2' % hour_date ) ) if ( not s3_key_exists ( s3_connection , log_path ) ) : missing . append ( hour_date ) for d in missing : print d
check existance of all hourly traffic logs for month_date .