Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: Remove unused astropy config code #944

Merged
merged 1 commit into from
Apr 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions ginga/_astropy_init.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Licensed under a 3-clause BSD style license - see LICENSE.txt
import os
from warnings import warn

from astropy.config.configuration import (
update_default_config, ConfigurationDefaultMissingError,
ConfigurationDefaultMissingWarning)
from astropy.tests.runner import TestRunner

try:
Expand All @@ -17,24 +13,3 @@
test.__test__ = False

__all__ = ['__version__', 'test']

# add these here so we only need to cleanup the namespace at the end
config_dir = None

if not os.environ.get('ASTROPY_SKIP_CONFIG_UPDATE', False):
config_dir = os.path.dirname(__file__)
config_template = os.path.join(config_dir, __package__ + ".cfg")
if os.path.isfile(config_template):
try:
update_default_config(
__package__, config_dir, version=__version__)
except TypeError as orig_error:
try:
update_default_config(__package__, config_dir)
except ConfigurationDefaultMissingError as e:
wmsg = (e.args[0] + " Cannot install default profile. If "
"you are importing from source, this is expected.")
warn(ConfigurationDefaultMissingWarning(wmsg))
del e
except Exception:
raise orig_error