Replace deprecated module optparse with argparse

This commit is contained in:
Sean Davis 2018-08-07 07:05:53 -04:00
parent 9af14fc129
commit 8c903ebcab
2 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
import optparse
import argparse
import signal
from locale import gettext as _
@ -30,11 +30,11 @@ from mugshot_lib import set_up_logging, get_version, helpers
def parse_options():
"""Support for command line options"""
parser = optparse.OptionParser(version="%%prog %s" % get_version())
parser.add_option(
parser = argparse.ArgumentParser(description="Mugshot %s" % get_version())
parser.add_argument(
"-v", "--verbose", action="count", dest="verbose",
help=_("Show debug messages (-vv debugs mugshot_lib also)"))
options = parser.parse_args()[0]
options = parser.parse_args()
set_up_logging(options)

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-07 06:57-0400\n"
"POT-Creation-Date: 2018-08-07 07:04-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"