git://git.camperquake.de
/
time-slider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial attempt at python3 conversion
[time-slider.git]
/
usr
/
share
/
time-slider
/
lib
/
time_slider
/
linux
/
autosnapsmf.py
diff --git
a/usr/share/time-slider/lib/time_slider/linux/autosnapsmf.py
b/usr/share/time-slider/lib/time_slider/linux/autosnapsmf.py
index
3152cf9
..
79b5000
100755
(executable)
--- a/
usr/share/time-slider/lib/time_slider/linux/autosnapsmf.py
+++ b/
usr/share/time-slider/lib/time_slider/linux/autosnapsmf.py
@@
-21,8
+21,8
@@
#
import time_slider.autosnapsmf as base
#
import time_slider.autosnapsmf as base
-import smf
-from timesliderconfig import Config
+
from .
import smf
+from
.
timesliderconfig import Config
SNAPLABELPREFIX = base.SNAPLABELPREFIX
SNAPLABELPREFIX = base.SNAPLABELPREFIX
@@
-49,11
+49,11
@@
def get_default_schedules():
instance = AutoSnap(s)
try:
_defaultSchedules.append(instance.get_schedule_details())
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" + \
"default auto-snapshot SMF instance:" + \
"\n\t" + instanceName + "\nDetails:\n" + \
- str(message)
+ str(message)
)
return _defaultSchedules
return _defaultSchedules
@@
-79,11
+79,11
@@
def get_custom_schedules():
instance = AutoSnap(label)
try:
_customSchedules.append(instance.get_schedule_details())
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" + \
"for custom auto-snapshot SMF " + \
"instance:\n\t" + label + "\n" + \
- "Details:\n" + str(message)
+ "Details:\n" + str(message)
)
return _customSchedules
class AutoSnap(base.AutoSnap):
return _customSchedules
class AutoSnap(base.AutoSnap):
@@
-126,4
+126,4
@@
if __name__ == "__main__":
defaults = get_default_schedules()
for sched in defaults:
S = AutoSnap(sched[0])
defaults = get_default_schedules()
for sched in defaults:
S = AutoSnap(sched[0])
- print
S.get_schedule_details(
)
+ print
(S.get_schedule_details()
)