forty-two/NightCycle — pull request #5 by eddiejessup (2014-02-01 12:06:49+00:00)
Title: Fix Exception when no time periods are defined

Handle the case when no time periods are defined in preferences (timePeriods is None). Also if time periods is empty, return a tuple (None, None) to match what the function call expects.