Skip to content

Commit ace5abb

Browse files
authored
Merge pull request #135 from pllim/config-no-write
MNT: Remove unused astropy config code
2 parents 06460f8 + 66d153f commit ace5abb

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

astrowidgets/_astropy_init.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,9 @@
99
__version__ = ''
1010

1111
import os
12-
from warnings import warn
13-
from astropy.config.configuration import (
14-
update_default_config,
15-
ConfigurationDefaultMissingError,
16-
ConfigurationDefaultMissingWarning)
1712

1813
# Create the test function for self test
1914
from astropy.tests.runner import TestRunner
2015
test = TestRunner.make_test_runner_in(os.path.dirname(__file__))
2116
test.__test__ = False
2217
__all__ += ['test']
23-
24-
# add these here so we only need to cleanup the namespace at the end
25-
config_dir = None
26-
27-
if not os.environ.get('ASTROPY_SKIP_CONFIG_UPDATE', False):
28-
config_dir = os.path.dirname(__file__)
29-
config_template = os.path.join(config_dir, __package__ + ".cfg")
30-
if os.path.isfile(config_template):
31-
try:
32-
update_default_config(
33-
__package__, config_dir, version=__version__)
34-
except TypeError as orig_error:
35-
try:
36-
update_default_config(__package__, config_dir)
37-
except ConfigurationDefaultMissingError as e:
38-
wmsg = (e.args[0] + " Cannot"
39-
" install default profile. If you are "
40-
"importing from source, this is expected.")
41-
warn(ConfigurationDefaultMissingWarning(wmsg))
42-
del e
43-
except Exception:
44-
raise orig_error

0 commit comments

Comments
 (0)