projects
/
dbuscron
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
args for OptionsParser defaults to sys.argv
[dbuscron]
/
dbuscron
/
parser.py
diff --git
a/dbuscron/parser.py
b/dbuscron/parser.py
index
b004fb7
..
0d26c85
100644
(file)
--- a/
dbuscron/parser.py
+++ b/
dbuscron/parser.py
@@
-78,8
+78,13
@@
class CrontabParser(object):
yield ruled, command
class OptionsParser(dict):
yield ruled, command
class OptionsParser(dict):
- def __init__(self, args, opts):
+ def __init__(self, opts, args=None):
super(OptionsParser, self).__init__()
super(OptionsParser, self).__init__()
+
+ if args is None:
+ import sys
+ args = sys.argv[1:]
+
from getopt import getopt
go, _ = getopt(args, opts)
from getopt import getopt
go, _ = getopt(args, opts)