Skip to content

Commit

Permalink
Rename non-public method in sqlalchemy db driver
Browse files Browse the repository at this point in the history
The can_show_deleted method is only used internally
to the sqlalchemy db api, so rather than make it seem
like part of the public api, prefix it with an underscore.

Change-Id: I0b78c8073471d96f8897f7bec2e2e04d152f0416
  • Loading branch information
bcwaldon committed Oct 4, 2012
1 parent 277f075 commit eed7baf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glance/db/sqlalchemy/api.py
Expand Up @@ -236,7 +236,7 @@ def image_get(context, image_id, session=None, force_show_deleted=False):
.filter_by(id=image_id)

# filter out deleted images if context disallows it
if not force_show_deleted and not can_show_deleted(context):
if not force_show_deleted and not _can_show_deleted(context):
query = query.filter_by(deleted=False)

image = query.one()
Expand Down Expand Up @@ -757,7 +757,7 @@ def _image_member_find(context, session, image_id=None, member=None):


# pylint: disable-msg=C0111
def can_show_deleted(context):
def _can_show_deleted(context):
"""
Calculates whether to include deleted objects based on context.
Currently just looks for a flag called deleted in the context dict.
Expand Down

0 comments on commit eed7baf

Please sign in to comment.