diff --git a/bin/monitor.py b/bin/monitor.py
index bd10c3220156c22f35191276156427c8f9f96854..2c03d8b0505e7af6ea248429ed73311a89f071b9 100755
--- a/bin/monitor.py
+++ b/bin/monitor.py
@@ -269,7 +269,7 @@ def print_observatories(args):
             print summary_table
             print gap_details
 
-        return warning_issued
+    return warning_issued
 
 
 def main(args):