code style reformatting using black
This commit is contained in:
parent
4127bcffd0
commit
744cb0c503
1 changed files with 21394 additions and 10488 deletions
|
|
@ -21,6 +21,7 @@ from sat.core.i18n import _
|
|||
from os.path import exists, splitext
|
||||
from optparse import OptionParser
|
||||
|
||||
|
||||
def getNewPath(path):
|
||||
""" Check if path exists, and find a non existant path if needed """
|
||||
idx = 2
|
||||
|
|
@ -31,21 +32,23 @@ def getNewPath(path):
|
|||
new_path = "%s_%d%s" % (root, idx, ext)
|
||||
if not exists(new_path):
|
||||
return new_path
|
||||
idx+=1
|
||||
idx += 1
|
||||
|
||||
|
||||
def check_options():
|
||||
"""Check command line options"""
|
||||
usage = _("""
|
||||
usage = _(
|
||||
"""
|
||||
%prog [options]
|
||||
|
||||
%prog --help for options list
|
||||
""")
|
||||
parser = OptionParser(usage=usage) # TODO: use argparse
|
||||
"""
|
||||
)
|
||||
parser = OptionParser(usage=usage) # TODO: use argparse
|
||||
|
||||
parser.add_option("-p", "--profile", help=_("Select the profile to use"))
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
if options.profile:
|
||||
options.profile = options.profile.decode('utf-8')
|
||||
options.profile = options.profile.decode("utf-8")
|
||||
return options
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue