Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get hour function #5

Open
Zahraa95 opened this issue Apr 30, 2017 · 0 comments
Open

Get hour function #5

Zahraa95 opened this issue Apr 30, 2017 · 0 comments

Comments

@Zahraa95
Copy link

I want to modify the code by adding a get Hour function that returns and print the Hour number on the terminal when its the time of the alarm, but its not working correctly it always show that this is not an integer.

Here the code I added:

  1. In the AlaramDB:
    def get_hour(self):

     alarms_table = self.__connect_alarms()
     alarm_dict = alarms_table.find(hour=self.hour)
    
     if alarm_dict is None:
         return None
     else:
         return AlarmItem(alarm_dict['hour'])
    
  2. in the Alaram manager:

@staticmethod
def get_hour():

    return AlarmDb().get_hour(hour)
  1. in the Alaram cli:

hournumb = self.alarm_mgr.get_hour(hour)

and when I add an alarm it shows me that self.alarm_mgr.get_hour(hour) is not an integer

can you please help us to fix this error as soon as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant