← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:staging-restore-in-place-again into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:staging-restore-in-place-again into launchpad:master.

Commit message:
Remove conflicting --dbname options

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/456082

`--dbname` is already set up by `lp.services.scripts.db_options` with a suitable default; trying to define it again results in a "conflicting option string" error.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:staging-restore-in-place-again into launchpad:master.
diff --git a/database/schema/security.py b/database/schema/security.py
index 0f2af6e..d742577 100755
--- a/database/schema/security.py
+++ b/database/schema/security.py
@@ -760,16 +760,6 @@ if __name__ == "__main__":
         default="postgres",
         help="Owner of PostgreSQL objects",
     )
-    parser.add_option(
-        "--dbname",
-        dest="dbname",
-        default=None,
-        metavar="DBNAME",
-        help=(
-            "Connect to DBNAME instead of the database name configured in "
-            "LPCONFIG."
-        ),
-    )
     db_options(parser)
     logger_options(parser)
 
diff --git a/database/schema/upgrade.py b/database/schema/upgrade.py
index d42369a..a65a10a 100755
--- a/database/schema/upgrade.py
+++ b/database/schema/upgrade.py
@@ -337,16 +337,6 @@ if __name__ == "__main__":
         action="store_true",
         help="Apply each patch in a separate session",
     )
-    parser.add_option(
-        "--dbname",
-        dest="dbname",
-        default=None,
-        metavar="DBNAME",
-        help=(
-            "Connect to DBNAME instead of the database name configured in "
-            "LPCONFIG."
-        ),
-    )
     (options, args) = parser.parse_args()
 
     if args: