mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 14:30:30 +03:00
remove all references to optparse (deprecated since Python 3.2)
This commit is contained in:
parent
717df09be0
commit
1e5699e90c
24 changed files with 115 additions and 93 deletions
|
|
@ -9,7 +9,6 @@ import importlib
|
|||
import inspect
|
||||
import json
|
||||
import logging
|
||||
import optparse
|
||||
import os
|
||||
import re
|
||||
import ruamel.yaml
|
||||
|
|
@ -22,6 +21,7 @@ import unittest
|
|||
import textwrap
|
||||
import yaml
|
||||
import gzip
|
||||
from argparse import ArgumentParser
|
||||
from zipfile import BadZipFile, ZipFile
|
||||
from unittest import mock
|
||||
from pathlib import Path
|
||||
|
|
@ -3294,15 +3294,15 @@ class ConfigOptionsScopeTest(unittest.TestCase):
|
|||
if __name__ == "__main__":
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
|
||||
parser = optparse.OptionParser()
|
||||
parser.add_option(
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument(
|
||||
"-v",
|
||||
"--verbose",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Spew out even more information than normal",
|
||||
)
|
||||
(fdroidserver.common.options, args) = parser.parse_args(['--verbose'])
|
||||
fdroidserver.common.options = parser.parse_args(['--verbose'])
|
||||
|
||||
newSuite = unittest.TestSuite()
|
||||
newSuite.addTest(unittest.makeSuite(CommonTest))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue