more string cleaning, remove useless CLI option from GBI
This commit is contained in:
parent
ad43f241eb
commit
e4ab1f37cf
|
@ -129,18 +129,18 @@ def get_config(file_name, fallback = True):
|
|||
if not config_found and fallback:
|
||||
shutil.copyfile(example_path, config_path)
|
||||
example_copy = True
|
||||
msg = _("No %s found\n in %s\n or %s\n") % (file_name, exec_dir, default_dir) \
|
||||
+ _("Config file has been created at %s.") % (config_path+"\n")
|
||||
msg = _("No %s found\n in %s\n or %s") % (file_name, exec_dir, default_dir) \
|
||||
+ " " + _("Config file has been created at %s.") % (config_path+"\n")
|
||||
print msg
|
||||
logging.info(msg)
|
||||
except:
|
||||
print _("Error copying .example config file, cannot fall back. Exiting.\n")
|
||||
sys.stderr.write(_("Error copying .example config file, cannot fall back. Exiting.\n"))
|
||||
print _("Error copying .example config file, cannot fall back. Exiting."), "\n"
|
||||
sys.stderr.write(_("Error copying .example config file, cannot fall back. Exiting.")+"\n")
|
||||
sys.stderr.write( str(sys.exc_info()) )
|
||||
sys.exit()
|
||||
elif fallback:
|
||||
print _("No %s found, cannot fall back. Exiting.\n") % file_name
|
||||
sys.stderr.write(_("No %s found, cannot fall back. Exiting.\n") % file_name)
|
||||
print _("No %s found, cannot fall back. Exiting.") % file_name, "\n"
|
||||
sys.stderr.write((_("No %s found, cannot fall back. Exiting.") % file_name) + "\n")
|
||||
sys.exit()
|
||||
|
||||
#print "get_config: returning "+str( (config_path,example_copy,example_path) )
|
||||
|
|
|
@ -663,18 +663,18 @@ class Fulltilt(HandHistoryConverter):
|
|||
tourney.buyin = 100*Decimal(clearMoneyString(mg['BUYIN']))
|
||||
else :
|
||||
if 100*Decimal(clearMoneyString(mg['BUYIN'])) != tourney.buyin:
|
||||
log.error(_("Conflict between buyins read in topline (%s) and in BuyIn field (%s)") % (tourney.buyin, 100*Decimal(re.sub(u',', u'', "%s" % mg['BUYIN']))) )
|
||||
log.error(_("Conflict between buyins read in top line (%s) and in BuyIn field (%s)") % (tourney.buyin, 100*Decimal(re.sub(u',', u'', "%s" % mg['BUYIN']))) )
|
||||
tourney.subTourneyBuyin = 100*Decimal(clearMoneyString(mg['BUYIN']))
|
||||
if mg['FEE'] is not None:
|
||||
if tourney.fee is None:
|
||||
tourney.fee = 100*Decimal(clearMoneyString(mg['FEE']))
|
||||
else :
|
||||
if 100*Decimal(clearMoneyString(mg['FEE'])) != tourney.fee:
|
||||
log.error(_("Conflict between fees read in topline (%s) and in BuyIn field (%s)") % (tourney.fee, 100*Decimal(clearMoneyString(mg['FEE']))) )
|
||||
log.error(_("Conflict between fees read in top line (%s) and in BuyIn field (%s)") % (tourney.fee, 100*Decimal(clearMoneyString(mg['FEE']))) )
|
||||
tourney.subTourneyFee = 100*Decimal(clearMoneyString(mg['FEE']))
|
||||
|
||||
if tourney.buyin is None:
|
||||
log.info(_("Unable to affect a buyin to this tournament : assume it's a freeroll"))
|
||||
log.info(_("Unable to detect a buyin to this tournament : assume it's a freeroll"))
|
||||
tourney.buyin = 0
|
||||
tourney.fee = 0
|
||||
else:
|
||||
|
@ -784,9 +784,9 @@ class Fulltilt(HandHistoryConverter):
|
|||
tourney.hero = heroName
|
||||
# Is this really useful ?
|
||||
if heroName not in tourney.ranks:
|
||||
print (_("%s not found in tourney.ranks ...") % heroName)
|
||||
print (_("%s not found in %s...") % ("tourney.ranks", heroName))
|
||||
elif (tourney.ranks[heroName] != Decimal(n.group('HERO_FINISHING_POS'))):
|
||||
print (_("Bad parsing : finish position incoherent : %s / %s") % (tourney.ranks[heroName], n.group('HERO_FINISHING_POS')))
|
||||
print (_("Error:")+ _("Parsed finish position incoherent : %s / %s") % (tourney.ranks[heroName], n.group('HERO_FINISHING_POS')))
|
||||
|
||||
return True
|
||||
|
||||
|
|
|
@ -341,9 +341,7 @@ def main(argv=None):
|
|||
|
||||
parser = OptionParser()
|
||||
parser.add_option("-f", "--file", dest="filename", metavar="FILE", default=None,
|
||||
help=_("Input file in quiet mode"))
|
||||
parser.add_option("-q", "--quiet", action="store_false", dest="gui", default=True,
|
||||
help=_("don't start gui; deprecated (just give a filename with -f)."))
|
||||
help=_("Input file"))
|
||||
parser.add_option("-c", "--convert", dest="filtername", default=None, metavar="FILTER",
|
||||
help=_("Conversion filter (*Full Tilt Poker, PokerStars, Everleaf, Absolute)"))
|
||||
parser.add_option("-x", "--failOnError", action="store_true", default=False,
|
||||
|
@ -378,9 +376,6 @@ def main(argv=None):
|
|||
settings.update(config.get_import_parameters())
|
||||
settings.update(config.get_default_paths())
|
||||
|
||||
if not options.gui:
|
||||
print _('-q is deprecated. Just use "-f filename" instead')
|
||||
# This is because -q on its own causes an error, so -f is necessary and sufficient for cmd line use
|
||||
if not options.filename:
|
||||
i = GuiBulkImport(settings, config, None)
|
||||
main_window = gtk.Window()
|
||||
|
|
Loading…
Reference in New Issue
Block a user