-#!/usr/bin/python2
+#!/usr/bin/python3
#
# CDDL HEADER START
#
#
import time_slider.autosnapsmf as base
-import smf
-from timesliderconfig import Config
+from . import smf
+from .timesliderconfig import Config
SNAPLABELPREFIX = base.SNAPLABELPREFIX
instance = AutoSnap(s)
try:
_defaultSchedules.append(instance.get_schedule_details())
- except RuntimeError, message:
- raise RuntimeError, "Error getting schedule details for " + \
+ except RuntimeError as message:
+ raise RuntimeError("Error getting schedule details for " + \
"default auto-snapshot SMF instance:" + \
"\n\t" + instanceName + "\nDetails:\n" + \
- str(message)
+ str(message))
return _defaultSchedules
instance = AutoSnap(label)
try:
_customSchedules.append(instance.get_schedule_details())
- except RuntimeError, message:
- raise RuntimeError, "Error getting schedule details " + \
+ except RuntimeError as message:
+ raise RuntimeError("Error getting schedule details " + \
"for custom auto-snapshot SMF " + \
"instance:\n\t" + label + "\n" + \
- "Details:\n" + str(message)
+ "Details:\n" + str(message))
return _customSchedules
class AutoSnap(base.AutoSnap):
defaults = get_default_schedules()
for sched in defaults:
S = AutoSnap(sched[0])
- print S.get_schedule_details()
+ print(S.get_schedule_details())