Skip to content

Commit

Permalink
If you miss the level on a price, turn it into ? rather than an error
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Nov 23, 2014
1 parent 85b2a97 commit 0c88de9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions commands/update_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import tkinter.messagebox as mbox
import tkinter.ttk as ttk
import sqlite3
import re
from pathlib import Path

class Item(object):
Expand Down Expand Up @@ -347,6 +348,12 @@ def getResults(self):

if asking == 0:
stock = "-"
elif not stock:
stock = "?"

if re.match('^\d+$', stock):
if int(stock) != 0:
stock += '?'

txt += (" {item:<30s} "
"{paying:>10} "
Expand Down

0 comments on commit 0c88de9

Please sign in to comment.