diff --git a/zulip/integrations/twitter/twitter-bot b/zulip/integrations/twitter/twitter-bot index 9b29a5c..7d0cf36 100755 --- a/zulip/integrations/twitter/twitter-bot +++ b/zulip/integrations/twitter/twitter-bot @@ -35,9 +35,9 @@ CONFIGFILE = os.path.expanduser("~/.zulip_twitterrc") def write_config(config, since_id, user): # type: (ConfigParser, int, int) -> None - config.set('twitter', 'since_id', since_id) - config.set('twitter', 'user_id', user) - with open(CONFIGFILE, 'wb') as configfile: + config.set('twitter', 'since_id', str(since_id)) + config.set('twitter', 'user_id', str(user)) + with open(CONFIGFILE, 'w') as configfile: config.write(configfile) parser = zulip.add_default_arguments(argparse.ArgumentParser(r""" diff --git a/zulip/integrations/twitter/twitter-search-bot b/zulip/integrations/twitter/twitter-search-bot index 1ecc4df..793943e 100755 --- a/zulip/integrations/twitter/twitter-search-bot +++ b/zulip/integrations/twitter/twitter-search-bot @@ -37,8 +37,8 @@ def write_config(config, since_id): # type: (ConfigParser, int) -> None if 'search' not in config.sections(): config.add_section('search') - config.set('search', 'since_id', since_id) - with open(CONFIGFILE, 'wb') as configfile: + config.set('search', 'since_id', str(since_id)) + with open(CONFIGFILE, 'w') as configfile: config.write(configfile) parser = zulip.add_default_arguments(argparse.ArgumentParser(r"""