Skip to content
This repository was archived by the owner on Aug 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request #265 from M-griffin/master
Browse files Browse the repository at this point in the history
Tetris and Weather Fixups
  • Loading branch information
jquast committed Mar 14, 2015
2 parents e8d4cdf + a8936cb commit 6340573
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2.0.11
- bugfix: weather.py fix incorrect postal code return from Accu Weather.
Changed the default to populate search by city/state instead of
postal since this is no longer returned from accu weather correctly.
Also re-added missing save location field that was outside of
while loop to funtion exit.
- bugfix: tetris.py fix for sending terminal font sequence prior to
ansi screen display instead of after.
2.0.10
- bugfix: display updates when posting to oneliners, issue #235

Expand Down
2 changes: 1 addition & 1 deletion x84/default/tetris.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def echo(s):
getch()
# set syncterm font to cp437
if term.kind.startswith('ansi'):
echo(syncterm_setfont('cp437'))
echo_unbuffered(syncterm_setfont('cp437'))
artfile = os.path.join(os.path.dirname(__file__), 'art', 'tetris.ans')
echo_unbuffered(u'\r\n' * term.height) # cls
if os.path.exists(artfile):
Expand Down
6 changes: 4 additions & 2 deletions x84/default/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def do_search(term, search):
disp_notfound()
else:
disp_found(len(locations))

return locations


Expand Down Expand Up @@ -509,14 +510,15 @@ def main():
while True:
echo(u'\r\n\r\n')
location = session.user.get('location', dict())
search = location.get('postal', u'')
search = location.get('city', u'') + ', ' + location.get('state', u'')
disp_search_help()
search = get_zipsearch(search)
if search is None or 0 == len(search):
# exit (no selection)
return

locations = do_search(term, search)

if 0 != len(locations):
location = (locations.pop() if 1 == len(locations)
else chose_location(locations) or dict())
Expand Down Expand Up @@ -552,6 +554,6 @@ def main():
get_centigrade()
break
elif inp.code == term.KEY_ENTER:
chk_save_location(location)
return

chk_save_location(location)

0 comments on commit 6340573

Please sign in to comment.