mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +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
|
@ -5,7 +5,6 @@
|
|||
import inspect
|
||||
import logging
|
||||
import os
|
||||
import optparse
|
||||
import shutil
|
||||
import sys
|
||||
import unittest
|
||||
|
@ -75,15 +74,17 @@ class InitTest(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",
|
||||
)
|
||||
(fdroidserver.init.options, args) = parser.parse_args(['--verbose'])
|
||||
fdroidserver.init.options = parser.parse_args(['--verbose'])
|
||||
|
||||
newSuite = unittest.TestSuite()
|
||||
newSuite.addTest(unittest.makeSuite(InitTest))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue