File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change 99 __version__ = ''
1010
1111import 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
1914from astropy .tests .runner import TestRunner
2015test = TestRunner .make_test_runner_in (os .path .dirname (__file__ ))
2116test .__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
You can’t perform that action at this time.
0 commit comments