File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 34
34
35
35
import time
36
36
from collections import namedtuple
37
- import adafruit_ds3231
38
37
from adafruit_featherwing import shared
38
+ import adafruit_ds3231
39
39
40
40
class RTCFeatherWing :
41
41
"""Class representing an `DS3231 Precision RTC FeatherWing
@@ -291,13 +291,13 @@ def unixtime(self):
291
291
"""
292
292
try :
293
293
return time .mktime (self ._rtc .datetime )
294
- except (ValueError , RuntimeError ) as error :
294
+ except (AttributeError , RuntimeError ) as error :
295
295
print ("Error attempting to run time.mktime() on this board\n " , error )
296
296
297
297
@unixtime .setter
298
298
def unixtime (self , unixtime ):
299
299
if isinstance (unixtime , int ):
300
300
try :
301
301
self ._rtc .datetime = time .localtime (unixtime )
302
- except (ValueError , RuntimeError ) as error :
302
+ except (AttributeError , RuntimeError ) as error :
303
303
print ("Error attempting to run time.localtime() on this board\n " , error )
You can’t perform that action at this time.
0 commit comments