Revision 46cf6260
b/daemons/ganeti-watcher | ||
---|---|---|
64 | 64 |
"""Exception raised when this host is not the master.""" |
65 | 65 |
|
66 | 66 |
|
67 |
def Indent(s, prefix='| '): |
|
68 |
"""Indent a piece of text with a given prefix before each line. |
|
69 |
|
|
70 |
@param s: the string to indent |
|
71 |
@param prefix: the string to prepend each line |
|
72 |
|
|
73 |
""" |
|
74 |
return "%s%s\n" % (prefix, ('\n' + prefix).join(s.splitlines())) |
|
75 |
|
|
76 |
|
|
77 | 67 |
def ShouldPause(): |
78 | 68 |
"""Check whether we should pause. |
79 | 69 |
|
Also available in: Unified diff