Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(26)

Delta Between Two Patch Sets: hooks/web-relation-joined

Issue 8999043: Fix charm for jujucharms.com use
Left Patch Set: Created 11 years, 11 months ago
Right Patch Set: Fix charm for jujucharms.com use Created 11 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « hooks/utils.py ('k') | revision » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #!/usr/bin/env python2 1 #!/usr/bin/env python2
2 #-*- python -*- 2 #-*- python -*-
3 3
4 import socket 4 import socket
5 from charmhelpers import ( 5 from charmhelpers import (
6 get_config, 6 get_config,
7 relation_set, 7 relation_set,
8 ) 8 )
9 9 from utils import log_hook
benji 2013/04/27 20:29:30 Unnecessary newline.
gary.poster 2013/04/28 01:48:15 I was doing as the Romans do, but eh, I don't thin
10 from utils import (
11 log_hook,
benji 2013/04/27 20:29:30 You can use a one-liner here.
gary.poster 2013/04/28 01:48:15 Again, I was following the local patterns in the c
12 )
13 10
14 11
15 def main(): 12 def main():
16 hostname = socket.getfqdn(socket.gethostname()) 13 hostname = socket.getfqdn()
17 if hostname == "localhost":
18 hostname = socket.gethostname()
benji 2013/04/27 20:29:30 I'm pretty sure lines 16-18 are equivalent to hos
gary.poster 2013/04/28 01:48:15 I stared at this for a bit. I think you are proba
19 config = get_config() 14 config = get_config()
20 if config['secure']: 15 if config['secure']:
21 port = 443 16 port = 443
22 else: 17 else:
23 port = 80 18 port = 80
24 relation_set(port=port, hostname=hostname) 19 relation_set(port=port, hostname=hostname)
25 20
26 if __name__ == '__main__': 21 if __name__ == '__main__':
27 with log_hook(): 22 with log_hook():
28 main() 23 main()
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b