Merge: Not null types
[nit.git] / contrib / benitlux / src / benitlux_daily.nit
index 8121683..bb6d1fa 100644 (file)
@@ -49,7 +49,7 @@ redef class Text
 
        # Return an `Array` of the non-empty lines in `self`
        #
-       #     assert ["a", "asdf", "", "  ", " ", "b"].to_clean_lines == ["a", "asdf", "b"]
+       #     assert ["a", "asdf", "", "  ", " ", "b"].join("\n").to_clean_lines == ["a", "asdf", "b"]
        fun to_clean_lines: Array[String]
        do
                var orig_lines = split_with("\n")
@@ -112,7 +112,7 @@ class Benitlux
                generate_email(beer_events)
 
                # Save as sample email to file
-               var f = new OFStream.open(sample_email_path)
+               var f = new FileWriter.open(sample_email_path)
                f.write email_title + "\n"
                for line in email_content do f.write line + "\n"
                f.close
@@ -230,11 +230,11 @@ if not opts.errors.is_empty or opts.help.value == true then
 end
 
 var ben = new Benitlux("sherbrooke")
-ben.run(opts.send_emails.value or else false)
+ben.run(opts.send_emails.value)
 
 # The parsing logic for the wellington locaiton is active (to gather data)
 # but the web interface do not allow to subscribe to its mailing list.
 #
 # TODO revamp mailing list Web interface
 ben = new Benitlux("wellington")
-ben.run(opts.send_emails.value or else false)
+ben.run(opts.send_emails.value)