Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #5 from JamesIves/changelog-enhancements
Browse files Browse the repository at this point in the history
Special Character and Low Upload Handling
  • Loading branch information
JamesIves authored Mar 29, 2018
2 parents bbe73b6 + 43e5af5 commit 89ee807
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@

def check_for_changes():
""" Runs the p4 changes command to get the latest commits from the server. """
p4_changes = subprocess.Popen('p4 changes -t -m 1', stdout=subprocess.PIPE, shell=True)
output = p4_changes.stdout.read().decode("utf-8")
p4_changes = subprocess.Popen('p4 changes -t -m 1 -l', stdout=subprocess.PIPE, shell=True)
output = p4_changes.stdout.read().decode('ISO-8859-1')

if output != global_store['latest_change']:
global_store['latest_change'] = output

return output
if '*pending*' in output:
return ''

else:
return output

else:
return ''
Expand Down

0 comments on commit 89ee807

Please sign in to comment.