Opened 8 years ago

Closed 8 years ago

#27120 closed Uncategorized (invalid)

Log message text in PostgreSQL _clone_test_db() refers incorrectly to alias

Reported by: Chris Jerdonek Owned by: nobody
Component: Database layer (models, ORM) Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Inside the PostgreSQL backend's creation.py, the text of a log message doesn't seem quite right (here is a link to the code):

if verbosity >= 1:
    print("Destroying old test database for alias %s..." % (
        self._get_database_display_str(verbosity, target_database_name),
    ))

The text refers to the "alias", but the database name is what is included in the message.

Change History (3)

comment:1 by Tim Graham, 8 years ago

_get_database_display_str() seems to return the alias followed (possibly) by the database name in parenthesis. Did I miss something?

comment:2 by Chris Jerdonek, 8 years ago

Oh, that was unexpected to me looking at the call site. The function accepts a database_name, but returns the alias (which is not a function of the database name).

It seems like something can be named better to make it less confusing (e.g. changing to "Destroying old test database: %s..." to match the name of the function), but I would be okay closing this issue.

comment:3 by Tim Graham, 8 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top