Skip to content

Commit

Permalink
mostly to test Circle, but yay formatting!
Browse files Browse the repository at this point in the history
  • Loading branch information
Undo1 committed Jan 17, 2015
1 parent e19502c commit 403a89d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions continuousintegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def watch_ci():
while 1:
conn, addr = s.accept()
conn.sendall('200')

addr_host = socket.gethostbyaddr(addr[0])[0]
is_circleci = True if re.compile(r"ec2-\d{1,3}-\d{1,3}-\d{1,3}-\d{1,3}.compute-1.amazonaws.com").search(addr_host) else False
print 'Received request from ' + addr[0] + " ; " + "verified as CircleCI" if is_circleci else "NOT verified as CircleCI!"
Expand Down

0 comments on commit 403a89d

Please sign in to comment.