Skip to content

Commit

Permalink
Remove patching of boto and hope it doesn't apply to boto3.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Apr 27, 2024
1 parent 4cac7ec commit 6034929
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions recapturedocs/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from jaraco.mongodb import helper

from . import jsonpickle
from .config import get_config_dir


def init_mongodb():
Expand All @@ -16,24 +15,4 @@ def init_mongodb():

def init():
init_mongodb()
patch_boto_config()
jsonpickle.setup_handlers()


def patch_boto_config():
"""
boto has a boto.config object which is used to persist boto
settings. The FPS module abuses this config by saving config to
system locations. This function patches the config so that config
data is only ever written to the recapturedocs config location.
"""
import boto.pyami.config

config_file = get_config_dir() / 'boto.cfg'
boto.pyami.config.UserConfigPath = config_file
boto.pyami.config.BotoConfigLocations = [config_file]
# set the system config path to an invalid name so nothing is ever
# stored there
boto.pyami.config.BotoConfigPath = '/invalid/path/name'
# recreate the boto.config instance
boto.config = boto.pyami.config.Config()

0 comments on commit 6034929

Please sign in to comment.