mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +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
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import inspect
|
||||
import optparse
|
||||
import os
|
||||
import sys
|
||||
import pkgutil
|
||||
|
|
@ -265,15 +264,17 @@ class MainTest(unittest.TestCase):
|
|||
if __name__ == "__main__":
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
|
||||
parser = optparse.OptionParser()
|
||||
parser.add_option(
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"-v",
|
||||
"--verbose",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Spew out even more information than normal",
|
||||
)
|
||||
(common.options, args) = parser.parse_args(['--verbose'])
|
||||
common.options = parser.parse_args(['--verbose'])
|
||||
|
||||
newSuite = unittest.TestSuite()
|
||||
newSuite.addTest(unittest.makeSuite(MainTest))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue