Merge pull request #128 from avidal/patch-2
Don't include " dontsave" when displaying weather API failures
This commit is contained in:
commit
7d2932f9c3
|
@ -22,11 +22,12 @@ def weather(inp, chan='', nick='', reply=None, db=None, api_key=None):
|
||||||
loc = None
|
loc = None
|
||||||
dontsave = True
|
dontsave = True
|
||||||
else:
|
else:
|
||||||
loc = inp
|
dontsave = inp.endswith(" dontsave")
|
||||||
|
# strip off the " dontsave" text if it exists and set it back to `inp` so we don't report it
|
||||||
dontsave = loc.endswith(" dontsave")
|
# back to the user incorrectly
|
||||||
if dontsave:
|
if dontsave:
|
||||||
loc = loc[:-9].strip().lower()
|
inp = inp[:-9].strip().lower()
|
||||||
|
loc = inp
|
||||||
|
|
||||||
if not loc: # blank line
|
if not loc: # blank line
|
||||||
loc = db.execute(
|
loc = db.execute(
|
||||||
|
|
Loading…
Reference in New Issue