Révision 7063330e
Fix python style issues reported by flake8
Additionally some python2-only "print" statements are now compatible
with python3.
| plugins/bacula/bacula_job | ||
|---|---|---|
| 100 | 100 |
|
| 101 | 101 |
# Get the current bytes |
| 102 | 102 |
if line.endswith(" is running."):
|
| 103 |
bytes_count_text = input_lines[pos+2].split()[1].split("=")[1].replace(",", "")
|
|
| 103 |
bytes_count_text = input_lines[pos + 2].split()[1].split("=")[1].replace(",", "")
|
|
| 104 | 104 |
try: |
| 105 | 105 |
# python2 |
| 106 | 106 |
bytes_count = long(bytes_count_text) |
| ... | ... | |
| 126 | 126 |
print("graph_category backup")
|
| 127 | 127 |
print("graph_order", " ".join(fd[1] for fd in clients))
|
| 128 | 128 |
print() |
| 129 |
if ((os.getenv("report_hostname") is not None) and
|
|
| 130 |
(os.getenv("report_hostname").upper() in ["YES", "TRUE", "1", "Y"])):
|
|
| 129 |
if ((os.getenv("report_hostname") is not None)
|
|
| 130 |
and (os.getenv("report_hostname").upper() in ["YES", "TRUE", "1", "Y"])):
|
|
| 131 | 131 |
print("host_name", hostname)
|
| 132 | 132 |
for client in clients: |
| 133 | 133 |
print("%s.label %s" % (client[1], client[0]))
|
Formats disponibles : Unified diff