Skip to content

Commit

Permalink
Remove PWD from possible config_file_dirs.
Browse files Browse the repository at this point in the history
Resolves bug #828719, which can potentially cause problems depending on
what $PWD commands are executed in.

Amendment: Also update documentation accordingly.

Change-Id: Ib2ec4bb07222e51c86b7d8f8ce1dd0e6bb342a64
  • Loading branch information
Adam Gandelman committed Sep 2, 2011
1 parent 09ea271 commit 706a533
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions Authors
@@ -1,3 +1,4 @@
Adam Gandelman <adam.gandelman@canonical.com>
Andrey Brindeyev <abrindeyev@griddynamics.com>
Brian Lamar <brian.lamar@rackspace.com>
Brian Waldon <brian.waldon@rackspace.com>
Expand Down
2 changes: 0 additions & 2 deletions doc/source/configuring.rst
Expand Up @@ -29,7 +29,6 @@ use (see `the documentation on controller Glance servers <controllingservers>`_)
If you do **not** specify a configuration file, Glance will look in the following
directories for a configuration file, in order:

* ``$CWD``
* ``~/.glance``
* ``~/``
* ``/etc/glance``
Expand Down Expand Up @@ -80,7 +79,6 @@ file. If it is, then we try to use that as the configuration file. If there is
no file or there were no arguments, we search for a configuration file in the
following order:

* ``$CWD``
* ``~/.glance``
* ``~/``
* ``/etc/glance``
Expand Down
6 changes: 1 addition & 5 deletions glance/common/config.py
Expand Up @@ -189,7 +189,6 @@ def find_config_file(app_name, options, args):
* If --config-file option is used, use that
* If args[0] is a file, use that
* Search for $app.conf in standard directories:
* .
* ~.glance/
* ~
* /etc/glance
Expand All @@ -207,8 +206,7 @@ def find_config_file(app_name, options, args):
return fix_path(args[0])

# Handle standard directory search for $app_name.conf
config_file_dirs = [fix_path(os.getcwd()),
fix_path(os.path.join('~', '.glance')),
config_file_dirs = [fix_path(os.path.join('~', '.glance')),
fix_path('~'),
'/etc/glance/',
'/etc']
Expand All @@ -228,7 +226,6 @@ def load_paste_config(app_name, options, args):
* If --config-file option is used, use that
* If args[0] is a file, use that
* Search for $app_name.conf in standard directories:
* .
* ~.glance/
* ~
* /etc/glance
Expand Down Expand Up @@ -264,7 +261,6 @@ def load_paste_app(app_name, options, args):
* If --config-file option is used, use that
* If args[0] is a file, use that
* Search for $app_name.conf in standard directories:
* .
* ~.glance/
* ~
* /etc/glance
Expand Down

0 comments on commit 706a533

Please sign in to comment.